Primitives Back

  • When accessing a primitive type, you should work directly on its value.
    • string
    • number
    • bool
    • null
    • undefined
const foo = 1;
let bar = foo;          /** number type */

bar = 9;

console.log(foo, bar);  /** => 1, 9     */