Appy Pie Interview Question

Explain how does closure workis in javascript