r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

2

u/PotaToss May 28 '19

How much bang for your buck you get from just knowing your operators, like conditional evaluation of expressions when you use boolean operators, and what those operators actually evaluate to (i.e. their operands, not true/false).

With that, destructuring, spread, and array functions like map and reduce, you can be very expressive with very little code.

It's double edged, though. Another thing beginners don't know is how important it is to comment very expressive code.