+ 1

Why console.log("2">"12"); is true ???

11th Jun 2020, 12:13 PM
Dibyajiban Sahoo
Dibyajiban Sahoo - avatar
2 Respuestas
+ 3
Basically it's a string ,and you know how strings are compared each character is compared with other string character ,and since 2 is greater than 1 so it is true
11th Jun 2020, 12:32 PM
Abhay
Abhay - avatar