I see some scripts put two tildes in front of variables, like so:
var a = ~~b;
As far as I can tell, all this does is ensure that a is given a number value. But is there a reason to prefer ~~ over +?
var a = +b;
Or is there something else going on?
Never knew that one.
Looked it up, and it does -(N+1)
So, if you have 1 ~~"2", you get the following: