Monday, July 27, 2020

Switching to JavaScript

- All variables are untype. Use 'let' to  to declare variables.
- Array variables are reference. Use 'const' to avoid unintended referencing array variables.
- Beware of methods that mutates its own object.
  - reverseary
- JavaScript object is diction or map.

Equality comparison

The abstract equality comparison (==) will perform a type conversion and compare the values. While the strict equality comparison (===) compares the values without type conversion. So, the triple equal signs are often use for value comparison.

Mutating methods

These are methods that should not be chained.

  • push
  • pop
  • shift
  • unshift
  • reverse

No comments:

Post a Comment