0
Why I am getting the output false ?
console.log("2" < "12")
5 ответов
+ 5
JavaScript compares the strings according to their lexicographical (dictionary) order based on Unicode. The first character '2' is 'larger' than '1'.
https://javascript.info/comparison
+ 1
Thanks Hatsy.
0
I think you are comparing strings (“”) and not integers
0
Yes, but output should be true.
0
I don’t really know that much about JS so why would that be true?