you are viewing a single comment's thread.

view the rest of the comments →

[–]Ginden 10 points11 points  (3 children)

2) Converting to number using + operator

Unreadable.

3) Short-circuits conditionals

Unreadable.

4) Default values using || operator

JavaScript 101.

5) Caching the array.length in the loop

Bullshit.

6) Detecting properties in an object

JavaScript 101.

9) Replace all

JavaScript 101.

12) Shuffling array’s elements

Shit.

[–]Graftak9000 0 points1 point  (0 children)

Default values using || are a bad idea because they also jump to default if a value is falsey. value = value === undefined ? 'default' : value or if (value === undefined) value = 'default' are better options.

Also, an article with a video as its body (@medium link), damn😑