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

on the first challenge in node.js it keeps telling me I am missing an ) after the argument list but i don't know why.

I can't figure out why it tells me this. I was pretty sure i tried everything to fix it.

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

2 Answers

Michael Liendo
Michael Liendo
15,323 Points

Instead of printing out the key/value pair

name: yousef

you just want the contents stored in name:

Raphaël Seguin
Raphaël Seguin
Full Stack JavaScript Techdegree Student 26,350 Points

... so you should write :


to log the name property (which is a string) of the object details.

Did it help ?

Michael Liendo
Michael Liendo
15,323 Points

Details doesn't have a name property.