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.

4

u/[deleted] Dec 27 '18

ES6 has classes but they’re really not classes like Java or Python classes. It’s just a better abstraction of the prototypical inheritance model. Probably to pander to Java users, bc familiar syntax.

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.

0

u/[deleted] Dec 23 '18

[deleted]

2

u/bronkula Dec 23 '18

What's the use of learning fundamentals today if you don't include the most current version of the language? Should I learn PHP 3 on the off chance some server still handles it? I say no. That is now the edge case, not the fundamental.

0

u/[deleted] Dec 23 '18

[deleted]

2

u/bronkula Dec 23 '18

Yeah, ok, but that doesn't mean it's not a fundamental to learn. If someone is just learning now, by the time they get out into the workforce it WILL be a standard. It already is.

Again, ES5 is now the edge case, not the fundamental.