JavaScript
Variable declarations
var
function scoped
can be redeclared and updated
hoisted and initialized with
undefined
as a value
let
block scoped
declaring in a for loop, inside an if or in a plain block is not going to let the variable "escape" the block
only use
let
to reassign the variablewhile
let
andconst
are hoisted but not initialized
const
immutable
block-scoped
default to
const
Array
Object
Promises
When you go to a restaurant, the hostess gives you a buzzer for your table. When the table is ready, the buzzer buzzes. You respond by sitting at the table.
The buzzer is a promise. It buzzes when the promise resolves, or is ready. The buzz is your handler.
Currying
Currying is a process to reduce functions of more than one argument to functions of one argument with the help of lambda calculus.
Last updated