# Need help with Nesting For Loops

**URL:** <https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768>\
**Category:** General\
**Created:** [August 14, 2017, 9:05pm UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768 "2017-08-14T21:05:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbmontana](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mbmontana](https://forum.freecodecamp.org/u/mbmontana)\
**Post date:** [August 14, 2017, 9:05pm UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768/1 "2017-08-14T21:05:29Z")

</div>

**Tell us what’s happening:**  
I’m not looking for the answer, just need some help to get me going on this. I guess my first question is how exactly does a console.log work and do I need to use it for this challenge?

**Your code so far**

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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/nesting-for-loops](https://www.freecodecamp.org/challenges/nesting-for-loops)

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [August 14, 2017, 9:10pm UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768/2 "2017-08-14T21:10:42Z")

</div>

`console.log()` is a very useful tool for debugging your code. It allows you to check the state of something at any given time by printing (“logging”) it to the terminal.

Here’s a silly little example of how you can use it to keep track of what’s going on in your code:  
https://repl.it/repls/OccasionalNoxiousCrocodileskink?lite=true

---

<div class="post-metadata">

**Author:** ![mbmontana](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mbmontana](https://forum.freecodecamp.org/u/mbmontana)\
**Post date:** [August 14, 2017, 9:12pm UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768/3 "2017-08-14T21:12:57Z")

</div>

How do you run console.log within the FCC challenges?

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [August 15, 2017, 1:02am UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768/4 "2017-08-15T01:02:47Z")

</div>

You will want to use your browser’s console by bringing up the dev tools.  
[Console and logging](https://www.freecodecamp.org/videos/console-and-logging)  
[Chrome Dev Tools: Console](https://www.freecodecamp.org/videos/chrome-dev-tools-console)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 6:45pm UTC](https://forum.freecodecamp.org/t/need-help-with-nesting-for-loops/141768/5 "2021-01-16T18:45:25Z")

</div>

Closed on January 16, 2021, 6:45pm UTC


