I see this code from a book:
var a = "one"; var b = "four"; a>b; // will return true
but it doesn't mention why "one" is bigger than "four". I tried
Because, as in many programming languages, strings are compared lexicographically.
You can think of this as a fancier version of alphabetical ordering, the difference being that alphabetic ordering only covers the 26 characters
©2020 All rights reserved.