MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/btxz72/what_are_some_javascript_things_beginners_dont/ep97p23
r/javascript • u/[deleted] • May 28 '19
383 comments sorted by
View all comments
Show parent comments
2
If you're using this in a closure I feel for most cases you're doing it wrong
1 u/thisisafullsentence May 29 '19 I generally agree in terms of code style, but many beginners wonder why `this` keeps changing and that's usually a result of a closure. The most typical solution of course is an arrow function but that syntax is an ES6 luxury.
1
I generally agree in terms of code style, but many beginners wonder why `this` keeps changing and that's usually a result of a closure. The most typical solution of course is an arrow function but that syntax is an ES6 luxury.
2
u/8lbIceBag May 29 '19
If you're using this in a closure I feel for most cases you're doing it wrong