Domanda di colloquio di NRG Edge

Define and write a closure in javascript to protect a variable during nested iterations.