21

Potato is not just a word.. 😎😎

Comments
  • 3
    WHO ATE THE POTATO!?
  • 2
    Oh it was your potatoes.
    Sorry, but i made potato chips out of them.
  • 1
    Thats dynamic languages for you.
    Typescript is the way too go.
  • 2
    It's primitive numbers vs Number objects. Whenever you bind a primitive like 5 as the 'this' context of a function JavaScript has to turn it into a Number object because 'this' must always be an object.
  • 2
    The Number object evidently stays an object for normal operators. But the increment operator for some reason returns a number primitive. So the object's properties are lost. And you can't reassign them because a number primitive can't have properties.
  • 2
    This code is enough to show the problem:

    function bool(){
    return this? true: false;
    }
    alert(bool.call(false) === true)
  • 1
    That's pretty Irish tbh. Irish love potatoes.
Add Comment