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 trialBruno Antonellini
7,168 PointsI receive an error saying I didn't write "console" anywhere on the script
Use the appropiate to print an object to the console
console.dir(details);
const name = "Andrew";
const details = { favouriteLanguage: "JavaScript", age: 33, children: 3 }
const errorMessage = "Something bad has occurred";
console.dir(details);
1 Answer
Robbie Thomas
31,093 Pointsconst name = "Andrew"; console.log(name); const details = { favouriteLanguage: "JavaScript", age: 33, children: 3 } const errorMessage = "Something bad has occurred";
add: console.log(name); on line 2.
Bruno Antonellini
7,168 PointsBruno Antonellini
7,168 PointsSolved! Saw another question where the same happened, and I found out I shouldn't have erased the "console.log" from the previous step.
So keep both lines: