3 ms·
> If JS objects are just glorified hash maps, why can I write a constructor function to do some stuff when the object is instantiated? There's no big reason fo
by masklinn 11y ago
> If JS objects are just glorified hash maps, why can I write a constructor function to do some stuff when the object is instantiated?
There's no big reason for that, and Object.clone doesn't give that hook, you have to use a wrapper function instead.
> JavaScript is absolutely an object-oriented programming language, but it's unusual because it's also pseudo-functional, in that functions are first-class citizens.
What's unusual about that?
> it's fascinating to learn about because there's no other language that works quite like JS.
That can be said about pretty much any and every language out there.