1.A function is created with an expression that starts with the keyword function. Functions have a set of parameters and a body, which contains the statements that are to be executed when the function is called.
2.Bindings declared with let and const are in fact local to the block that they are declared in, so if you create one of those inside of a loop, the code before and after the loop cannot “see” it. Var keyword, are visible throughout the whole function that they appear in—or throughout the global scope, if they are not in a function.
3.A pure function is a specific kind of value-producing function that not only has no side effects but also doesn’t rely on side effects from other code—forexample, it doesn’t read global bindings whose value might change. A pure function has the pleasant property that, when called with the same arguments,
it always produces the same value (and doesn’t do anything else).