SOURCE

const o = {
    valueOf: () => {
        return 1
    },
    toString: () => {
        return 2
    }
}
console.log(+o)
console 命令行工具 X clear

                    
>
console