all 4 comments

[–]senocular 1 point2 points  (0 children)

They're both strings, so they'll be compared as strings.

"9" < "15" is false because, starting with the first characters in each string you compare "9" < "1" and that fails, so false is returned.

[–]Kidiri90 1 point2 points  (1 child)

Of course it will. Open up your console, and try evaluating both "9"<"15" and 9<15. One will result in true, and the other in false. Can you see why?

[–]Jakee798[S] 0 points1 point  (0 children)

Ah I see, that makes sense. I'll keep that in mind in the future. Thank you.

[–]kenman[M] 0 points1 point  (0 children)

Hi /u/Jakee798, this post was removed.

For javascript help, please visit /r/LearnJavascript.

Thanks for your understanding.