'Arguments' and Spread
Arguments: The parameters you pass to a function
Javascript gives you a keyword of the same name whch contains them all
Spread is the new way of doing arguments using ...
Excecution Context is Created sets up:
- Variable Environment: Hold us variable
- 'this'
- Outer Environment: for Scope Chain
- 'arguments': Contains a list of all the values of all the parameters that you passed to a function
function greet(firstname, lastname, language){
console.log(firstname);
console.log(lastname);
console.log(language);
}
We get 'Undefined' for the console because of Hoisting