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 Node.js Basics 2017 Introduction to Node.js The Console

Gena Aivazian
Gena Aivazian
14,144 Points

Im not sure what im doing wrong, i tried everything but i think there is a bug in this assignment

I think there is a bug cos it get an error no matter what i put in

app.js
const name = "Andrew";
const details = { favouriteLanguage: "JavaScript", age: 33, children: 3 } 
const errorMessage = "Something bad has occurred";

console.log(details);

2 Answers

Steven Parker
Steven Parker
217,557 Points

I'm guessing you're on task 2, where the instructions say "Use the appropriate console method to print out the details object." But the appropriate message to print out an object is "dir" instead of "log".

And the instructions also say "Important: In each task of this code challenge, the code you write should be added to the code from the previous task.", so the statement for task 1 should still be there (but is missing from this code).

Gena Aivazian
Gena Aivazian
14,144 Points

Ah! my bad! my previous code was not present. Thank you!