Re:30 seconds of code: Curated list of useful JavaScript sni...
by TheDong on Monday December 11, 2017 @02:19PM
(#15899490)
It is not the same as that. the fat arrow doesn't change the value of "this" while the function definition does.
[ Parent
| on HN ]
Re:30 seconds of code: Curated list of useful JavaScript sni...
by geoelectric on Monday December 11, 2017 @02:47PM
(#15899739)
Given that "this" isn't referenced in the function, though, it's practically equivalent.
Re:30 seconds of code: Curated list of useful JavaScript sni...
by simlevesque on Monday December 11, 2017 @03:01PM
(#15899897)
I think one is more efficient memory wise but I'm not sure which one.