Appy Pie interview question

Explain how does closure workis in javascript