I have an object and would like to prevent certain properties from being modified or removed. The code below is for illustrative purposes:
var pessoa = {
nome: 'Fulano de Tal',
doc: '999.999.999-99'
};
console.log(pessoa);
pessoa.doc = '111.111.111-11'; // Modifica
console.log(pessoa);
delete pessoa.doc; // Remove
console.log(pessoa);
Can these actions be prevented?