Nodejs Number Negate negate()

Here you can find the source of negate()

Method Source Code

Number.prototype.negate = function ()
{
    "use strict";
    return -this;
};

(4.24242).negate();/*from w  w  w .j a  v  a2s. co m*/

Related

  1. negate()
    Number.prototype.negate = function ()
        "use strict";
        return -this;
    };
    for (var i = 1; i < 1e4; ++i)
        (0x424242).negate();
    
  2. negate()
    Number.prototype.negate = function ()
        "use strict";
        return -this;
    };
    (0xfffffff * 100000).negate();
    
  3. negate()
    Number.prototype.negate = function ()
        "use strict";
        return -this;
    };
    noInline(Number.prototype.negate);
    for (var i = 0; i < 1e4; ++i)
        (i % 3 === 0 ? -i : i).negate();
    for (var i = 0; i < 1e4; ++i)
    ...