Pergunta de entrevista da empresa Nivoda

First round: Bunch of questions were asked about the the JS code snippets and its output. Finally a coding question: Create a grid of boxes and when user clicks on the boxes in any order the color changes let's say from black -> white. After all the boxes have been clicked. The color resets one by one in the same order user has clicked.