Is closure a function? What is a nested function? What is a function scope? What is lexical environment and how does it work?
In this article, we’re going to answer all these questions and more – we are going to learn what functions and closures in JavaScript are, and most of all what is the main difference between functions and closures.