Object.freeze(person) will alone not freeze the person object(even top level properties). It returns a new object whose top level properties are frozen.
Please verify before posting.
You will see it outputs 1. I.e I'm unable to change the code... so I'm not sure what you are talking about to be honest? See MDN even developer.mozilla.org/en-US/docs/W...
Object.freeze(person) will alone not freeze the person object(even top level properties). It returns a new object whose top level properties are frozen.
Please verify before posting.
I don't agree.. Try this code
You will see it outputs
1
. I.e I'm unable to change the code... so I'm not sure what you are talking about to be honest? See MDN even developer.mozilla.org/en-US/docs/W...Oh yeah , My bad you're right
Acc to docs it says
and not what I claimed it to be
Sorry for wasting your time, I was just drained for the day I guess.
appreciate you trying to help to correct the article.. and taking the time reading it.