JavaScript’s keyword this is a source of pain for a lot of people. A common question goes something like this:
“I make call a Firebase function, ...
For further actions, you may consider blocking this person and/or reporting abuse
Hey, nice post=) If you are interested in I did a post about setTimeout and this in callback (I considered a browser as environment and actually in node.js this is defined in different way):
dev.to/smlka/easyspec-how-does-set...
I use arrow function 100% of time
I think that is much cleaner
Plus I can't think any reason to scope this inside a function (just don't make sense to me, scope in class maybe)
Actually there are cases where you want to have the inner scope rather then the outer:
Sorry, this pattern is just worse, really worse
Hope you won't type this in real world
MDN recommends against using arrow functions for methods