Exploring terminologies related to functions and understanding the difference between them.
This article will explain the Function Statement, Function Expression, Function Declaration, Anonymous Functions, and First Class Functions.
The above function statement is also known as Function Declaration.
These types of functions are generally used as arguments inside other functions.
There is a difference between function parameters and arguments.
Here param1 and param2 are parameters, whereas “1,2” in line 5 are arguments.
Execution context can be thought as a big box . It has two parts one is Memory component and other is Code component.
In memory space , every variable and function is stored as a key, value pair. It is also known as variable environment.
Code component is the place where every line of code is executed one by one. It is also known as thread of execution.
It happens in two phases one is Memory Allocation Phase and other is Code Execution Phase
CS Junior @ IIIT Gwalior