JS

JavaScript ES6 - reference to the object

8.

What is the final value of obj if we run the following code snippet?

const obj = { foo: 1 }; 
obj.foo = 2;
console.log(obj)

Error, you cannot modify a constant object.

{ foo: 1 }

{ foo: 2 }

{ foo: 1, foo: 2 }