bool = !bool;
This holds true in most languages.
More Related Contents:
- What are bitwise operators?
- Data-toggle tab does not download Leaflet map
- How to getElementByClass instead of GetElementById with JavaScript?
- In JavaScript, why is “0” equal to false, but when tested by ‘if’ it is not false by itself?
- How do I toggle an element’s class in pure JavaScript?
- Is && statement() the same as if() statement()?
- Logical operator || in javascript, 0 stands for Boolean false?
- When to use the double not (!!) operator in JavaScript
- What is the purpose of new Boolean() in Javascript?
- Toggle show/hide on click with jQuery
- In javascript, is an empty string always false as a boolean?
- Is there a better way of writing v = (v == 0 ? 1 : 0); [closed]
- Toggle visibility property of div
- Converting string “true” / “false” to boolean value [duplicate]
- Using jQuery, how do you find only visible elements and leave hidden elements alone?
- Convert boolean result into number/integer
- How to fire jQuery function only if form is valid
- Why if([]) is validated while [] == false in javascript?
- How to toggle class using pure javascript in html
- Jquery, hide & show list items after nth item
- How to auto-reload files in Node.js?
- JavaScript – head, body or jQuery?
- Arrow Function syntax not working with webpack?
- Google SEO and hidden elements
- Regex eError when using {1}+ possessive quantifier in JavaScript regex
- Set the default save as name for a an or that uses a Blob [duplicate]
- Declaring array of objects
- make readonly/disable tinymce textarea
- Proper use of ||
- Is there a JavaScript alert that doesn’t pause the script?