If I declare a JavaScript boolean variable like this:
var IsLoggedIn;
And then initialize it with either true or 1, is that safe? Or will initializing it with 1 make the variable a number?
Is there a really easy way to toggle a boolean value in javascript?
So far, the best I've got outside of writing a custom function is the ternary:
bool = bool ? false : true;