This example creates an object, freezes it, and then creates a new object from the frozen object.
If the second object tries to change the test property, it can\'t. It remai
var first = {
test: 10
};
Object.freeze(first);
//Create a second object from the first one and
//try and change the new test property (you can't)
var second = Object.assign({}, first, {
test: 20
});
console.log(second.test); //20