Homepage
Sign in / Sign up
Go to the profile of Shilp Gupta
Shilp Gupta
Jul 28, 2016
No need to duplicate behavior of Math.abs() var absoluteValue = Math.abs;
Anubhaw Srivastava
12

I’m sure it isn’t necessary for this example, but calling Math.abs is *actually* different from calling absoluteValue directly right?

I mean, to achieve full parity to the original implementation you’d need to say `var absoluteValue = Math.abs.bind(Math);` ?

  • Go to the profile of Shilp Gupta

    Shilp Gupta

    • Share
    Go to the profile of Shilp Gupta
    Never miss a story from Shilp Gupta, when you sign up for Medium. Learn more
    Never miss a story from Shilp Gupta