set boolean to opposite javascript code example Example: javascript boolean change value var NAME = true NAME = !NAME