-1

Look at this following piece of code:-

var object = { name: 'Harry', age: '25', sex: 'male'};
console.log(object.name)

When I run this, I get 'Harry'. However, I would like to print the property itself 'name' instead. How can I access that and print it?

so I should get an output of 'name'.

Jack
  • 1
  • 2

0 Answers0