0
JavaScript
In learning JavaScript, is it necessary for me to understand why âAâ > âBâ is false Or True + false is 1 ?
3 Answers
+ 2
Yes...
+ 3
IMO understanding is key to success.
read
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Less_than
same apply to Greater than.
a) If both values are strings, they are compared as strings, based on the values of the Unicode code points they contain.
b) Boolean values true and false are converted to 1 and 0 respectively.