JS Logical Madness
2 answers
Values ββare strings. When you use them ==
to compare them with numbers, the numbers are first (internally) converted to strings. However, it <
compares the two strings as strings, and therefore the string "1000" is actually smaller than the string "53" because "1" precedes "5" in the character set.
+5
source to share