Functions
Programs are assigning the values to the memory or variables and running the program to do somethings with the variables.
without functions programs can't do anything.
Function Expression:
var canada = function() {
console.log("cold");
}
Function Declaration:
function india() {
console.log("warm");
}
Function Invocation/Call/Execution:
canada(); // defined at run time that what this function does
india(); // defined at parse time - hoisting
Function invocation will create an Execution context that gives an this (=window) and arguments object.
Last updated
Was this helpful?