[Comparison between the front end of the string of numbers _js] js

Js string comparisons in accordance with the priority rank, compare the size of each ASCII character, including a comparison between the number string.

1.console.log("1"<"3");//true 

2.console.log('5'<'10');//false  

3.console.log("123"<"123");//false

4.console.log("abc"<"aad");//false 

Guess you like

Origin www.cnblogs.com/leiblog/p/10936605.html