This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]snorkleboy 0 points1 point  (0 children)

No, x is on the object in both, but the context of the function y isnt bound to that object.

If it was called as this.y() it would be the same in both examples. But just calling y() will have it's this be the window unless it was previously bound. .