8bitzz / blogs

0 stars 0 forks source link

Just Javascript #20

Open 8bitzz opened 3 years ago

8bitzz commented 3 years ago

Reference: Just Javascript course

Values and Code

Primitive Values

  1. Undefined (undefined), used for unintentionally missing values.
  2. Null (null), used for intentionally missing values.
  3. Booleans (true and false), used for logical operations.
  4. Numbers (-100, 3.14, and others), used for math calculations.
  5. BigInts (uncommon and new), used for math on big numbers.
  6. Strings ("hello", "abracadabra", and others), used for text.
  7. Symbols (uncommon), used to perform rituals and hide secrets.

Objects and Functions

  1. Objects ({} and others), used to group related data and code.
  2. Functions (x => x * 2 and others), used to refer to code.

Expressions

Values and Variables

Primitive Values Are Immutable

Variables are not values

Variables Are Wires