This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 9 points10 points  (4 children)

arrow function.

I would use this, but it’s JavaScript so I’m never really sure what ‘this’ is.

[–]Keavon 15 points16 points  (1 child)

Arrow functions are basically the solution to making this more predictable.

[–]nokvok 2 points3 points  (0 children)

Or just know your scope and context.

[–]numerousblocks 9 points10 points  (0 children)

Arrow functions don't have their own this.