The little red triangles on nodes indicating an error

I am (attempting to write some code in a function node.

All being good and no errors shown, I click the ok button.

I see an error triangle on the node.

Opening the node again, I still don't see any errors.

Screenshot from 2020-01-20 06-57-29

Kinda makes it difficult to know where the error is.

Oh, P.S.
I just worked out the error:
code:
let array = []

All the same, why wasn't the line marked when I open the editor?
That is the real question.

Know idea why no error but couple of suggestions

I wouldn't call my variable array - I'd call it something like queueArray

(I wouldn't call any variable in any language something that looks like a type e.g wouldn't use int or integer or string etc as variable names)

and small syntax error
if (msg.topic == "CONTROL")

1 Like

Thanks.
(For the if (msg.topic find.

Only kind of just got up 1 hour ago. Brain not 100% up to speed.

Yeah, I shall change the name of the "array".