Loops with Arrays in Javascript In our last session, we had seen, What is Array and what are different array…