DEV Community

Discussion on: JavaScript Interview Questions — Theory

Collapse
 
pris_stratton profile image
pris stratton

Interesting stuff - I would come back to this before an interview 😀

I really enjoyed doing research into prototypal inheritance having come from learning OOP in Java in Uni.

Collapse
 
aumayeung profile image
John Au-Yeung

It's quite interesting. But now JavaScript has the class syntax, which is just syntactic sugar that hides the prototypical inheritance.

Collapse
 
pris_stratton profile image
pris stratton

Do you think that’s a good thing? I’ve always felt it shoehorns the language into looking like Java when in reality they are very different.

Thread Thread
 
aumayeung profile image
John Au-Yeung

I like that it's more consistent with class-based languages.

But then everyone should learn about prototypes before using it.

Thread Thread
 
pris_stratton profile image
pris stratton

I agree, that’s a good way of putting it 😀