javascript toggle variable
snippet in javascript

javascript toggle variable

user4294

var thing = true; //try changing this to false
thing = !thing; //the variable will go from true to false, or from false to true