What is function?
Functions are the main “building blocks” of the program. They allow the code to be called many times without repetition.
What is anonymous function?
An anonymous function is a function without a name. An anonymous function is often not accessible after its initial creation.
The rest of the parameters can be included in the function definition by using three dots
... followed by the name of the array that will contain them. The dots literally mean gather the remaining parameters into an array.
Block level function with strict mode and without strict mode
Two type of block level function
1. Works outside the block level function scope without strict mode.
2. Don’t works outside the block level function scope with strict mode. Showed result is undefined.
Block binding in loop
If you assign a variable using var keyword in loop, you can access it from outside.
If you assign a variable using let keyword in loop, you can not access it from outside.
If there is an error in the code, a try catch is used to handle it.
/*. To end the comment, use these symbols