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:<
Let's see this in action:
var b = true; console.log(b); // true b = !b; console.log(b); // false b = !b; console.log(b); // true
Anyways, there is no shorter way than what you currently have.