JavaScript
Last updated
Last updated
Use "modern" JavaScript approaches (aka , & newer)
variables: const
& let
(instead of var
)
try to use const
when possible
If you must use let
for your implementation, it may be a sign of "code smell". Consider alternate implementations that allow you to use const
When "reassigning the variable" makes the most sense, use let
+ switch statement (vs const + nested ternary operators)
array methods
forEach
, map
, filter
, reduce
, sort
, some
, every
, ...
...