- Home /
How do I compare boolean variables?
If "Var1" and "Var2" are booleans, how to I compare them in javascript? It's kind of how Mathf.Approximately is used to compare values.
Example:
Var1 is True, and Var2 is False. The script compares them and determines that they aren't the same.
Comment
Best Answer
Answer by Eric5h5 · Jul 23, 2011 at 12:54 AM
Compare them the same way you compare most any variable.
if (var1 == var2)
Your answer
Follow this Question
Related Questions
How to handle different bools in 1 statement 1 Answer
Array with boolean variables? 3 Answers
Change a Variable on Key Down 5 Answers
How to fix unstable boolean values? [possible bug] 1 Answer
Some Boolean "Action" Trouble 2 Answers