r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

Show parent comments

3

u/DerGernTod May 28 '19

Being unable to fully understand or explain the 2 pillars of Javascript: Functional programming & Object Oriented Programming. one more thing that probably fits into #4 of your list: the prototype chain

1

u/Mydrax May 28 '19

When you learn OOP in JS, you will indefinitely come across the prototype chain, won't you?

2

u/DerGernTod May 28 '19

true, but i think it's worth mentioning that OOP in JS is vastly different from OOP languages such as e.g. java. understanding the concept of the prototype chain is imo more important than learning the syntactic sugar keyword class and what it does (i agree a lot with kyle simpsons opinion on this, it's very misleading for people coming from different programming languages)

3

u/MoTTs_ May 28 '19

it's very misleading for people coming from different programming languages

Depends on which different language we're talking about. JavaScript's classes work surprisingly similar to Python's or Ruby's classes. JavaScript and Python classes side-by-side