Saving this info for later.
function. Use only arrows and method definitions. Benefit: handling
thisbecomes much simpler (details).
- Promises. Use only async functions. Learn what to watch out for (you can’t ignore Promises as completely as
- Iterating over objects. Use Maps, instead.
for(avoid if you can). Use
arguments. Use rest parameters (
Function.prototype.apply(). Use the spread operator (
- Constructor functions. Use classes, instead.
- IIFEs. Use blocks, instead.
From this great JS blog.
Import statements snippet for VS Code