How to make a property or a method in an object immutable in JavaScript?
Originally posted here!
Let's say you have an object called John.
const John = {};
Now we can add the name property and assign it a value of John Doe and also make it a not changing or immutable property.
We can acheive this through the Object.defi...
melvingeorge-me.hashnode.dev2 min read