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
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