- How can you create a function in Javascript?
A function is created with an expression that starts with the keyword function and has a set of parameters, and a body that has the statements that are execuited when the function is called.
- What is the difference between var and let in regards to scope?
The scope of var is global, or the whole program (you can refer to it wherever you want in the program. The scope of let is local, or only the function or block that they are declared in.
- What is a pure function?
It 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.