News for hackers. Stuff that matters.
Re:What if JavaScript wins? by abritinthebay on Thursday May 17, 2018 @05:18PM (#17095971)
Likely you'd like the modern class syntax then.

You declaratively specific the "class" (it's just an Object under the hood, it's mostly sugar for prototypes) and then you could just to instanceOf to test if it's your "type".

I mean in JS basically everything is an object so if you're constructing a "type" you're constructing an object no matter what.

There are no comments on this comment yet.