Need to Help with J.S. Iterator and Loop. How to understand the use

HI!
I need to understand the use of Iterator and Loop. I read the answers about step 8 of Mini Linter project but I don’t understand why write this code. I know there are some many way to write code, but i’ve not right skills in JS for write iterator and loop.

If there is someone else italian member I would be grateful!

THANKS! <3

Hello @flaxflavis, welcome to the forums! Is there any code you’d like us to review? Basically, an iterator is just something that moves you through the loop:

for (let i=0; i<5; i++){
  console.log(i);
} 
//will print the numbers 0-4 on the console.

One good thing to do when you’re stuck is to write psuedo-code. This is just instructions written in your preferred (human) language on how you would go about doing the task by hand. I.e. for the code above, you could write: write numbers 0 through to 4(inclusive). Then, after you’ve written this, it should be easier to turn into code.


If you do share code on the forums, see this thread.

1 Like

Thanks a lot for advice and clarifications!!

1 Like