Sobes.tech
Junior — Senior

The impact of const and let on modifying object fields

livecode

Task condition

Specify what output will appear in the console after executing the following code fragment:

const constObj = {
  item: "foo",
};

let letObj = {
  item: "bar",
};

constObj.item = "bar";
letObj.item = "foo";

console.log(constObj, letObj);