Hmm, `A boolean was expected` :thinking_face: I g...
# javascript
a
Hmm,
A boolean was expected
🤔 I guess its a boolean otherwise code wouldn't have been compiled.
t
It can be
0
🙂
In most “boolean” cases it works as
false
But
0
is short 🙂
a
Comparision operator returns short? blob thinking fast
Imma confused a bit 😅
t
Comparision operator returns short? blob thinking fast
0
can be used in JS platform as short variant of
false
a
Still didn't really understood what I did wrong 🤔
t
Will it work with
!!
?
!!this == KeyState.KEY_DOWN
?
a
Is that a syntax 👀
(I'm not aware of)
t
!!(this == KeyState.KEY_DOWN)
Brackets required
a
I guess you mean
(this == KeyState.KEY_DOWN)!!
?
I don't think its result is null 🤔 a comparision is either true or false, isn't it?
t
No, I mean double
not
Boolean operation
a
Oh, ok, wait lemme see