Basic JavaScript: Nesting For Loops (function definition)

In this lesson, I’m nesting for loops, which i vaguely understand. what I don’t understand is why there is no definition for “arr” in the problem.

it looks like “arr” may be defined after the area were supposed to code? in python 3 I need to define things first then create functions if im not mistaken, I know its a different language but I’m confused

function multiplyAll(arr) {

  var product = 1;

  // Only change code below this line

  // Only change code above this line

  return product;

}

multiplyAll([[1,2],[3,4],[5,6,7]]);

please include the code you are asking about

my post has been updated

arr is the function parameter, and takes the value of the argument passed in wheb the function is called
in this case [[1,2],[3,4],[5,6,7]]


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).