0

Why output is true?

alert('nine' < 'seven') Why output is true? Thanks!

20th Nov 2018, 4:50 PM
Rex Hung
2 ответов
+ 5
Strings are compared using their alphabetical order. 'nine' starts with 'n', which comes before 's', so 'nine' < 'seven'.
20th Nov 2018, 5:33 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Thanks
21st Nov 2018, 2:40 PM
Rex Hung