JS

JavaScript Code Output Challenge - Json

4.

What will be the output of the following code snippet?

const data = '{"name": "John", "age": 30}';
const parsedData = JSON.parse(data);

console.log(parsedData.name);

undefined

30

name

John