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 trial

JavaScript Node.js Basics (2014) Introduction to Node.js The Console

Gino Mangnoesing
Gino Mangnoesing
6,744 Points

Stuck in Challenge

The Error says: "Bummer! You didn't write console anywhere in your code."

But I did include console in my code. I tried it on my own machine and it works there. So I'm just wondering what could be the cause. Maybe a bug?

app.js
var name = "Andrew";
var details = { favouriteLanguage: "JavaScript", age: 31, children: 2.4 } 
var errorMessage = "Something bad has occurred";

console.dir(details)

2 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Gino;

A couple of things, strictly based on the code you have posted above.

  1. I believe the challenge stills wants/needs the information from Task 1.
  2. You don't have a semi-colon to end the Task 2 line of code.

Happy coding,

Ken

Martina Carrington
Martina Carrington
15,754 Points

Hi Ken Alger , i have try console.dir(details); and console.dir(); i keep getting errors . maybe i'm doing some wrong

Ken Alger
Ken Alger
Treehouse Teacher

martina carrington:

Post your code and let's take a look.

Ken

Gino Mangnoesing
Gino Mangnoesing
6,744 Points

Ah, I see! Thanks Ken.

I missed this note below the question:
Important: The code you write in each task should be added to the code written in the previous task.