Boolean values, also called logical values, are basically true or false. They are usually used in conditional expressions and statements. If you are familiar with C++, you probably recognize these terms as 1 and 0, 1 representing true and 0 representing false. JavaScript officially uses the true and false values to express Boolean values, but 1 and 0 are acceptable in most situations.The true value, or 1, can usually be replaced by any nonzero integer. Avoid
using these numeric values as Boolean, because Netscape has not officially recognized this kind of usage and may opt to invalidate it in future versions of the browser. Usage of integer values to represent Boolean values, as in
other programming languages, can cause data type confusion and should not be done at all by novice programmers.
using these numeric values as Boolean, because Netscape has not officially recognized this kind of usage and may opt to invalidate it in future versions of the browser. Usage of integer values to represent Boolean values, as in
other programming languages, can cause data type confusion and should not be done at all by novice programmers.
Comment