Pregunta de entrevista de NRG Edge

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