How to get opposite boolean value of variable in Javascript
>>> a = true;
true
>>> !a;
false
Use the logical NOT operator:
!a
This would be much easier
var b = !a
This would make true a false and false a true
>>> a = true;
true
>>> !a;
false
Use the logical NOT operator:
!a
This would be much easier
var b = !a
This would make true a false and false a true