js & Number & String
compare
// labelWeight = 0.022 string
0.022 < 0.33
// true
"0.022" < "0.33"
// true
"0.34" < "0.33"
// false
"0.34" < 0.33
// false
"0.32" < 0.33
// true
0.32 < "0.33"
// true
0.34 < "0.33"
// false
分别写出如下代码的返回值
String('11') == new String('11');
String('11') === new String('11');
String('11') == new String('11');
true
String('11') === new String('11');
false
String('11')
"11"
typeof String('11')
// "string"
new String('11');
String {"11"}
typeof new String('11');
// "object"
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!