change the value of a Boolean variable on click in javascript code example Example: javascript boolean change value var NAME = true NAME = !NAME