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

PHASEKA MALATJI
PHASEKA MALATJI
431 Points

something wrng here the console.dir functions is not evaluating

console.dir() not picking up

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

1 Answer

One Weru
One Weru
47,634 Points

Hello, your are doing great. This was as step by step challenge ... check closely to see the change in each step.

console.log(name); // don't delete the code you used in previous step
console.dir(details);

Happy coding!

Michael Hulet
Michael Hulet
Treehouse Moderator 46,955 Points

Hey One!

It's frowned upon in the Community to post code that can be copied and pasted and just work, especially answers to challenges. It's ok to post code, but make sure that you also post a thorough explanation about why that code is the right code and how it works, but also make sure that the code can't be copied and pasted to pass a challenge, too. I've redacted the original code in this answer accordingly. If you'd like, feel free to re-post your code (or something similar that doesn't break the copy/paste rule), but be sure to include a thorough explanation of how it works and why its the right code for this situation. Thanks for helping out in the Community!

One Weru
One Weru
47,634 Points

I get it. I thought demonstrating was better than explaining ... given that challenge was rather straightforward.