JavaScript Functions
up:: JavaScript Functions are just JS Objects. In that way, they are JS Non-primitives.
Functions
`function add(first,second)
-
every code we want to run more than once
-
return myVar
: Returns the value of myVar -
=>
(parameters → return)
Rest operator
Closures
When a function is defined, JavaScript locks in all variables used in it.