@t532 第一条规则 >若任何一侧是 string 或 object 则两边转换为 string 进行连接
关于object不是准确的。
举例:
const obj = { [Symbol.toPrimitive](hint) { console.log('hint', hint) }};'12' + obj; // 此时hint为default12 + obj; // hint也为default按照ES标准规则,hint为default则会依次调用valueOf和toString
所以不一定是两边转换为string进行连接
eg:
const obj = {valueOf() { return 12;},toString() { return '21';}}obj + 1; // 13```


