News for hackers. Stuff that matters.
Re:V8 Release v9.4 by LouisSayers on Monday September 06, 2021 @05:29PM (#28438320)
Ah yes, the good parts :)

I've found understanding exactly how JS works to become more confusing with class structures.

It feels like you need a PHD in JS to have a good grip on how it all works under the covers.

Using Crockfords closure strategy for me was quite straightforward and simple, and I've enjoyed doing:

const MyClass = {}; MyClass.new = () => {}; const instance = MyClass.new();

Which leaves all the "this." ugliness behind and provides a ruby-like instantiation.

There are no comments on this comment yet.