57
enitoni
8y

When everyone is complaining about how terrible JavaScript is and I'm just sitting there thinking "but... I like it.."

Comments
  • 7
    Maybe I would like it to, if I finally would understand "this"
  • 4
    @Yast2 "this" is easy once you grasp it. Just remember that if you reference "this" in a function, then whatever calling that function will be "this"
  • 1
    @enitoni So its something like an alias?
  • 1
    @Yast2 Whenever you need "this" in a function, pass it in a "self" parameter on the function. Then you can access"this". However with ES6 arrow functions, there's no need.
  • 1
    @enitoni Thanks for the explanation!
  • 0
    What happens 'When...' that is happening? (I like it too 'though')
  • 0
    And that's okay. we all have our own problems.
  • 6
    I like it too. It's unpredictable. That makes feel challanged, makes me think, makes me rant on devRant.

    I like that
  • 0
    @Yast2 this always refers to the parent of the current context.
Add Comment