Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 Francis
Alex Francis
11,475 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