https://github.com/getify/You-Dont-Know-JS/tree/1st-ed

If it’s not a primitive, it’s an object.

Untitled

Undefined → when a variable doesn’t have a value assigned to it or for a function that doesn’t return anything

Null → something you assign explicitly

Objects can be mutated.

Untitled

Functions are 'first class citizens' in JavaScript and can be assigned to variables. Or passed as an argument to another function.

<aside> 💡 Use const unless you know it’s going to be changed for sure.

</aside>

Objects → key value pairs

Statements vs Expressions

Statements are a command for the computer to do something.

Expression are something that return a value.

console.log(/* Some chunk of JS here */);
// if it returns an error that chunk is a statement
// if it returns a value that means its an expression!

Expressions can't exist on their own. They're always part of a statement.