Home >Web Front-end >JS Tutorial >Convert String to number in js for comparison_javascript tips
Comparing strings without conversion will result in a headache
If you were not careful when writing, you would not convert it, and then use it for rough testing,
17a73f1ea17e4914ebf70ab99505f46b421.003
Weird results occurred
When the data type is not converted to judge >, 75d1766e180023da8e0e1f2bba8a3298str2*1
When comparing data in js, don’t forget to convert types!