- How can you create a function in Javascript?
A function is created with an expression that starts with the keyword function. This is followed by a set of parameters and a body which contains the statement that are to be executed when the function is called.
- What is the difference between var and let in regards to scope?
The scope of var is global, whereas, the scope of let is local.
- What is a pure function?
Pure Function is a function (a block of code) that always returns the same result if the same arguments are passed. It does not depend on any state, or data change during a programâs execution rather it only depends on its input arguments.