# NR Linter - \[msg\] Unreachable code

**URL:** <https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820>\
**Category:** General\
**Created:** [22 April 2026 16:04 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820 "2026-04-22T16:04:36Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 April 2026 15:59 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/21 "2026-04-24T15:59:14Z")

</div>

> [@mudwalker](#):
>
> so reigneth confusion again

What confusion?

It's simple.

A constant is a constant unless it is an object at which point it is mostly constant but not quite.

![WiseOldAsianManWithBeardGIF](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c4950ff41ba2e7ddcdf39221a6391b208c4354ff.gif)

😵‍💫

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 April 2026 07:30 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/22 "2026-04-25T07:30:06Z")

</div>

> [@mudwalker](#):
>
> reigneth confusion again

The reason is that objects and arrays are accessed by reference. So when I say  
`let a = {x:1, y:2}`  
a is effectively a pointer to the object (or array), not the actual object. The reason javascript works like this is for efficiency, as if I now say  
`let b = a`  
then it is not necessary to make a copy of the object and put it into b (which would be onerous for large arrays or objects), but just point b to the object. So if I say  
`const obj = {x:1, y:2}`  
I am saying that obj is a constant pointer to an object, meaning that the pointer cannot change. Not that obj is a pointer to a constant object.

Personally I usually don't use const for objects and arrays as it is easily misunderstood.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [25 April 2026 08:57 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/23 "2026-04-25T08:57:45Z")

</div>

Thank you for that Colin,

I can now see how it all comes together, it requires me to have a slight shift in my mind set. I wrote a lot of my stuff using this...

`LDA 30H`  
`MOV B.A`  
`LXI H.41H`  
`LXI D.61H`  
`ANA A`  
`ADDW: LDAX D`  
`ADC M`  
`MOV M.A`  
`INX D`  
`INX H`  
`DCR B`  
`JNZ ADDW`  
`JMP XXXXH`

8080 ASM

I will keep your explanation as an aide memoire. I get it, just need to remember it!🤣

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 April 2026 15:01 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/24 "2026-04-25T15:01:57Z")

</div>

> [@mudwalker](#):
>
> I wrote a lot of my stuff using this...
> 
> `LDA 30H`  
> `MOV B.A`

We are obviously of the same vintage.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 April 2026 17:18 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/25 "2026-04-25T17:18:50Z")

</div>

I learned and wrote 6502 Assembly and even learned to read but not write some IBM 370 mainframe assembly. But I always preferred FORTH. 😃

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2026 07:30 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/26 "2026-04-26T07:30:11Z")

</div>

I loved the idea for FORTH but when I tried to use it for anything serious it didn't really work well for me.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 April 2026 11:12 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/27 "2026-04-26T11:12:38Z")

</div>

It is certainly a VERY different way of thinking. It took me a while to get my head around it certainly. However, its ability to write code in a high-level language and yet compile down to something utterly tiny was a real draw back in the day where memory might be maxing out at a few kB rather than the GB we have today.

The famous example was that of an airport operations tool that was completely written in FORTH and ran on a very small computer.

I was using it on the BBC Micro and it was great there.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 April 2026 07:25 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/28 "2026-04-27T07:25:46Z")

</div>

Had the BBC Micro and used it to develop some Hardware that a couple of us had developed. We then went on to writing the code for the 8080 which had a max (iirc) of 64kB of addressable EPROM for the program and the RAM was much less. CPU cycles and Memory usage were both critical things for us!

The closest I got to FORTH was the Opto22 PAC Controllers, they evidently ran on a version of Forth, but I didn't really interface with that directly.

Of course, things got very 'professional' when I add the CP/M Module with the Business Package Software and two 5 1/4" Disk Drives. :lol

Of the fun of it all.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2026 08:06 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/29 "2026-04-27T08:06:29Z")

</div>

Oooh, this looks fun. [https://www.npmjs.com/package/webforth](https://www.npmjs.com/package/webforth)

I think we absolutely need to be able to code in FORTH within node-red. I am surprised that no-one has provided this already. Forget typescript, lets GO FORTH.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 April 2026 12:02 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/30 "2026-04-27T12:02:05Z")

</div>

> [@Colin](#):
>
> Forget typescript, lets GO FORTH.

😃

I look forward to seeing your `function-forth` node! 👍🧙‍♂️

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 May 2026 12:02 UTC](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820/31 "2026-05-11T12:02:38Z")

</div>

Closed on 11 May 2026 12:02 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/nr-linter-msg-unreachable-code/100820.md?page=1)
