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.