#Age value is not showing up in console

3 messages · Page 1 of 1 (latest)

sharp quarry
#

Below I created an object called "items" which has some data and when I am doing console.log() it is only printing Name, Place, and Developer values.

const items = {
"Name": "Manoj Pillamari",
"Age": 24,
"Place": undefined,
"Developer": true
}

console.log(items["Name", "Age", "Place", "Developer"])

Output:-
Manoj Pillamari
undefined
true

blazing ledge
#

Are you trying to print the object values? you can try console.log(Object.values(items))

thin heart
#

It's not clear to me what you're trying to do... I've never seen the syntax that you're trying to log so either you've done it wrong OR you know something I don't (i.e. you cannot de-index the object with [] notation and multiple items...).

Strictly speaking you can log the entire object like this:

console.log(items)

If that's not what you're looking for please provide more information.