Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops Working with 'for' Loops The for Loop

Kelsey Donegan
Kelsey Donegan
3,342 Points

What are the small circled numbers to the left of what the console is logging?

It's usually a 2, sometimes a 3. Even though there are supposed to be 10 different random numbers logged to the console, sometimes there are only 8 or 9, with some numbers having a circled 2 to their left. At first I assumed it was grouping the numbers that appeared multiple times, but there are other numbers that appear multiple times and don't get combined as such. What's going on here, and what's causing it?

1 Answer

Alex Hort-Francis
Alex Hort-Francis
17,074 Points

Hello!

It sounds to me like what you are seeing is:

  • the console has printed the same output more than once in a row
  • instead of displaying the same output twice, the console only shows it once
  • but it includes a number next to the line of output indicating how many times that line has been repeated.

More info here: https://stackoverflow.com/questions/5584835/why-does-google-chrome-group-identical-console-log-messages