Currently, I am working on a project that requires me to write code for a specific array loop. However, I am struggling to grasp the step-by-step process of how it functions. Could someone please provide an explanation? The purpose of this loop is to calculate the square root, but I need help understanding each individual step in its operation.
var oldArray = [12, 45, 6, 23, 19, 20, 20, 15, 30, 42];
// Write your code below this line
var newArray = [];
for (i = 0; i < oldArray.length; i++) {
newArray.push(oldArray[i] * oldArray[i]);
}