News for hackers. Stuff that matters.
Re:Classes Are Making Me Sad by shp0ngle on Wednesday March 08, 2017 @06:45PM (#13825115)
Once I started using arrow notations, I stopped worrying about `this`.

Whenever I need to export class function, I do

    var foo = () => bar.baz()
, no more worrying, no need to understand what the hell bind does exactly.

Also with the ... notation, I stopped worrying about .call and .apply. So I can write

    var someArray = [a,b,c]
    var foo = () => bar.baz(...someArray)
and so on.

There are no comments on this comment yet.