Help me understand please ...
I have a function and variable var_push is a string value "06.10"; the function work fine...
If I change the function (image)
I have a alert? warning? (image)
Why? Where is the problem?
(I change const to let but this is not the problem of course)
let x = flow.get('var_push') means the editor has no idea what
Lets say for arguments sake x is now an instance of
MyLegacyStringhas a prototype function named
substr - this is perfectly valid as far as the editor knows.
let x = "06:10" makes the editor realise that
x is a native
string. And as @dceejay points out...
substring() method instead
In short, use
substring if you care - or use
substr if you dont.
Thank you very much .....