I thought arrow functions couldn't access 'this' properly? Or is it that it misses the context in prototyping but works in immediates? No... gah, see this is why I dislike it.
Those just seem like pointless syntactic sugar designed to make what's happening less clear. That last part with the const (not behaving as constants would in ANY other language) in particular.
OF course JOE FORBID they give us actual constants or SHOCK defines. Instead we get some goofy "const" that has nothing to do with what they do in any other language, and "let" to do C's idiotic confusing (stack hell) scope binding whilst making the language look more and more like 4k Level 1 ROM Basic.
The first example there doesn't even look like it should be valid JavaScript (or valid in any language for that matter), the latter one is just taking something simple and making it aggravatingly cryptic.... all to save what? Six characters if you reduced the whitespace so as to compare apples to apples?
Starting to think that after 40 years I've just been at this $#!T for too long. The only thing worse than pointless changes are regressions that amount to nothing more than ignoring lessons already learned the hard way. It's often painful to watch the same mistakes repeated every six to ten years.