标签:call 转换 cti val const on() obj turn console
var obj = {
valueOf: function() { return 3; },
toString: function() { return 2; }
};
const sym = Symbol(obj);
console.log(sym); // ‘Symbol(2)‘ call toString
console.log(‘2‘ + obj); //‘23‘ call valueOf
标签:call 转换 cti val const on() obj turn console
原文地址:http://www.cnblogs.com/ax-null/p/6855693.html