Since the whole code block runs, the order you write code affects what the console displays. Place counter++ first to display 6 through 10.
counter++
6
10
Make sure to pick counter++;, followed by console.log(counter);.
counter++;
console.log(counter);