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 trialRodi Haas
1,504 Pointsi do not understand for what they use the console.log??
i understand where i can find it. but that's it
3 Answers
Lauren Stuckey
12,428 PointsHey Rodi, as you learn more about JavaScript you'll find that console.log has many uses for helping programmers to keep track of what is going on in their code. It is a useful place for someone working with the code to see what is going on "behind the scenes" without displaying the content on the webpage itself. In addition, console.log is often used for debugging code since it allows you to see exactly which parts of your code are running correctly, and which are not.
John McCall
2,630 PointsYou can use the console.log, to show that the program has "started" and "finished" so that you know there was nothing that was missed because the program made it to the last line! It's an awesome way to make sure everything ran!
Gianni Zamora
9,547 PointsYou can also use console.log in mathematical operations to help you build bigger applications.