SOURCE

function check(x) {
    return x = isNaN(x) ? 0 : x-0;
}
Number.prototype.add = function (x) {
    x = check(x);
    return this + x
}
Number.prototype.minus = function (x)  {
    x=check(x);
    return this - x
}
console.log((5).add(3).minus(2))
console 命令行工具 X clear

                    
>
console