I wanted to have an object field that is immutable. I've tried:
const a = 1;
var o = {
x: 'This is mutable',
y: a // This should not be mutable.
};
o.y = 'Changed';
console.log(o);
Field y
gets re-assigned.
Is there any way to make this work?