React

ReactJS Practical Questions - object literal enhan...

13.

When you log person to the console, what is the output?

const name = 'John';
const age = 25;
const person = { name, age };
console.log(person); 

{person: {name: "John", age: 25}}

{person: "John", person: 25}}

{name: "John", age: 25}

{{name: "John", age: 25}}