一般来说字符串的比较是利用字符串的第一个字符的ascii值码进行比较,如果是字符串和数字相比较的话就把数字转化为字符串再利用ascii值进行比较
(function(){
console.log('5'>'10'); // '5' 的ascill 是53 10 其中的1 ascill 是 49 输出为false
console.log(50>'100'); // 50 中 '5' 的ascill 是53 100 其中的1 ascill 是 49 输出为false
console.log('ffff'>'aBDC') // f ascill 值是102 a 的ascill 是97 输出: true
})()