NVIDIA interview question

Closure in JS