376
SD010
3y

'this' in JavaScript

Enough said :|

Comments
  • 11
    Console.log(this)
  • 6
    So true 😂
    ES2015 spec make this clearer, though. You need to check that out 👍
  • 5
    "this" is the problem
  • 1
    Gaah, "this" is shit.
  • 1
    scope
  • 2
    *This* is funny =)
  • 1
    ES6 arrow functions ftw
  • 1
    var _this = this;
  • 4
    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
  • 0
    okay but what the heck is #microFrontend
Your Job Suck?
Get a Better Job
Add Comment