A closure is nothing but functions that are tied to its lexical environment. A function in JavaScript always remembers its origin story, from where it's been come from; due to this, it remembers the local and global variables.
Link: https://codeomelet.com/posts/one-day-i-will-find-some-closure