Javascript test time-out

Hey guys, so I’ve been solving the javascript tests and this one asks me to create nested loops. I type my code and run the test but apparently I just get a “time out”. It stops solving them and all my tests come out failed. The last version of my code is identical to the one of the tutorial video. Has anyone had this problem? It seems pretty weird that it would just say screw it bruh i’m not solving this, especially since the timeout comes up pretty early.

function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for (var i=0; i < arr.length; i++) {
for (var j=0; i < arr[i].length; j++) 
{ product *= arr[i][j];
// Only change code above this line
return product;

// Modify values below to test your code

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.

Challenge: Nesting For Loops

Link to the challenge:

You have created an infinite loop in the following line:

for (var j=0; i < arr[i].length; j++) 

Look carefully and see if you can see the variable that is causing the issue.

You are right! I got distracted and put an i instead of a j in the second one. Damn I need to be more attentive when I write these things.

One way to catch these kinds of things faster is to use variable names which describe the data they represent. For example:

for (var outerIndex = 0; outerIndex < arr.length; outerIndex++) {
  for (var innerIndex = 0; innerIndex < arr[outerIndex].length; innerIndex++) {