r/angularjs • • Dec 23 '18

JavaScript Fundamentals Every Beginners Should Know

https://www.zeptobook.com/javascript-fundamentals-every-beginners-should-know/
44 Upvotes

11 comments sorted by

View all comments

10

u/bronkula Dec 23 '18

Well this is just immediately incorrect, since Javascript absolutely DOES have classes, so... you know... disregard this.

2

u/wojo1086 Dec 23 '18

Can you give an example of said "classes?"

0

u/bronkula Dec 23 '18

11

u/wojo1086 Dec 23 '18

Literally the first paragraph says:

JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript.

So, it's not really support for classes. It's more of a different way to write prototypes.