Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 669 Bytes

checklist.md

File metadata and controls

20 lines (15 loc) · 669 Bytes
  1. [CODE STYLE] - don't mutate original array elements - it will cause unexpected results later on.
  2. [CODE STYLE] - avoid creating needless copies of arrays, you can iterate existing array
  3. [CODE STYLE] - use plus operator with assignment operator = if you want to add something to existing value

BAD EXAMPLE:

let a = 1;

a = a + 2;

GOOD EXAMPLE:

let a = 1;

a += 2;
  1. [CODE STYLE] - avoid using nested if statements, we are sure that you can do it without them :)
  2. [CODE STYLE] - don't write loops inside if statement. It's making your code too complicated. Remember that loop with false condition simply will iterate 0 times.