You are viewing a single comment's thread.

view the rest of the comments →

0
0

[–] tragicwhale [S] ago 

I'm going to read your comment over and over but I feel like the portion where you talk about it refering to window helped. Thanks for your response.

0
0

[–] Cuddlefluff ago  (edited ago)

I'm not any good at explaining things, but it's really quite easy once you "get" it. I have a long career of object oriented programming (C++, Java and C#), and this also confused me a great deal in JavaScript in the beginning. It's not as intuitive and obvious as you'd expect. But it all boils down to whether or not you wrote a . - this would refer to the object on the left-hand side of the ., If there is no . it would refer to the global scope aka window. That's it, I don't know if I'm able to make it any clearer than that :P

0
0

[–] tragicwhale [S] ago 

haha, it's all good man, I'll just keep at it. I don't feel so bad knowing that it's not that intuitive. Thanks again.