For the first loop


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
What does the counter++ mean?

```

for (var counter = 1; counter < 11; counter++) {
console.log(counter);
}

<do not remove the three backticks above>

#2

It increments the variable counter so that the value changes by +1 every time so that the loop isn’t infinite.


#3

@noobyprogrammer

##What the counter does

  1. You create a variable called counter and assign it like value, 1.
  2. As long as counter is smaller than 11.
  3. We increment counter
  4. We print the value of counter in the console.
  5. The loop starts back again until counter is not smaller than 11

Hoped it helped! :slight_smile:


#4

so is
++ equal to +1?


#5

Yes.

counter++

is the same as

counter = counter + 1

#6

or

counter += 1

#7

cool Thanks. Alright one last question, will this work with ** or // ?


#8

@noobyprogrammer

Sorry but ** and // doesn’t exist unless you talk about comments(by combining the two of them).