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 triallassek
8,209 PointsI see no result difference using console.log vs console.dir
Hi all!
I'm a new teamtree student delighted to have found this great place for studies.
My question: When I printout the result from a data callback, I don't see any difference using console.log or console.dir. It seems to be identical json result?
2 Answers
Steven Parker
231,269 PointsBack in May, someone asked a similar question, and I said;
In the past, the behavior was quite different, particularly when logging object contents, but I've noticed that newer JavaScript engines have expanded the functionality of "console.log" so there isn't much different from "console.dir" anymore.
lassek
8,209 PointsAh ok; marked "best answer" now, happy coding to you too:-)
lassek
8,209 Pointslassek
8,209 PointsOk, many thanks!
Steven Parker
231,269 PointsSteven Parker
231,269 PointsGlad i could help — happy coding!