I just wasted about 45 minutes on a stupid mistake - again.
So, I am reading a context value, and need it to be something rather than
If it is a number, the option is something like:
let x = context.get("blah") || 0;
Which means if
blah isn't set (for what ever reason)
x is given the value of
I'm not exactly sure about text, but for now, I will let that go (though I know it will bite me soon).
Say I am doing something and it has a valid range of 0 - 255.
0 is as valid as
But I want the value returned if the context isn't set to be .... say 123. (Half 255)
How do I do that?
I can't set it to
0 then say
if == 0 make it 123 because if it is
0 it will be changed to
I am missing something it would seem.