Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
1.In a method, this refers to the owner object.
2. Alone, this refers to the global object.
3. In a function, this refers to the global object.
4. In a function, in strict mode, this is undefined.
5. In an event, this refers to the element that received the event.
6. Methods like call(), and apply() can refer this to any object.
Hope this answers your rant -
Molkan1005yDoes it is really hard to know to what "this" is currently reffering?
If so i guess i am really good in JS :D
Related Rants
'this' in JavaScript
Enough said :|
undefined
js
javascript
this