Master the JavaScript Interview: What is a Closure?

“Master the JavaScript Interview” is a series of posts designed to prepare candidates for common questions they are likely to encounter when applying for a mid to senior-level JavaScript position. Closures are frequently used in JavaScript, and no JS interview is complete without this question.