Skip to content Skip to sidebar Skip to footer

Why Does "10" > "9" = False?

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

Solution 1:

It's comparing the strings "alphabetically", and 1 comes before 9 in the character "alphabet".


Post a Comment for "Why Does "10" > "9" = False?"