Is this a failure in JavaScript's attempt to convert them to numbers? If so, what numbers are they being converted to? Or what is the logic behind the string 10 being less than the string 9?
Asked
Active
Viewed 1,740 times
1
-
1For the same reason that "alpha" > "beta" = false – Steven Jun 03 '14 at 21:57
1 Answers
12
It's comparing the strings "alphabetically", and 1 comes before 9 in the character "alphabet".

Blazemonger
- 90,923
- 26
- 142
- 180