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,324 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 Graduate 29,223 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,324 Points

Details doesn't have a name property.