What will the following code log?
const obj = { a: 1 }; obj.b = 2; console.log(obj);
{ a: 1 }
{ a: 1, b: 2 }
Error
undefined
This question is part of this quiz :