JavaScript Node.js Basics Introduction to Node.js The Console

Use the appropriate console method to print out the details object.

console.dir(details);

This does not work.. why?

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

console.dir(details);

2 Answers

Rich Zimmerman
Rich Zimmerman
24,057 Points

looks like you're missing

console.log(name);

from the previous task, which might be why it's failing.

Mariusz Dabrowski
Mariusz Dabrowski
6,132 Points

I ran into the same issue and could not figure out why it wasn't passing - luckily I was aware of this forum and saw this question.

Maybe an update to the error would help somebody that's stuck on the same question - it was really discouraging to hit this wall so early on, thinking something was being done wrong.

thank you..