A closure is a function that allows access to variables from its outer function and global variables, even after the outer function has finished executing. It is created when a nested function references a variable from its containing function.
Code ...