- How can you create a function in Javascript?
Function is a variable which takes function as value.
- What is the difference between var and let in regards to scope?
let is a local binding while var is a global binding. Let cannot be used outside of the block which local binding it was created.While var is global and can be used anywhere.
- What is a pure function?
a pure function is a function which does not take into any global or local bindings as input. A pure function is also free of side effects.