Question d’entretien chez Khoros

How does lexical scope work in JavaScript? Explain the concept of closure, and provide an example.