标签

1.数字+字符串:将数字转换为字符串。

2.数字+Boolean:将Boolean转换为number类型。

3.数字+undefined:结果为NaN,NaN的类型为number。

4.字符串+Boolean:将Boolean转换为字符串。

5.Boolean+Boolean都转换成number再相加运算。

注:NaN:not a number 判断一个非数 ,如果不是一个数字返回true,如果是一个数字返回false。

例:var str="hello Word";

你可能感兴趣的:(标签)