I don't agree.. Try this code
const obj = { a: '1' }; Object.freeze(obj) obj.a = 2 console.log(obj.a);
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...
1
Oh yeah , My bad you're right
Acc to docs it says
freeze() returns the same object that was passed into the function
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.
Some comments have been hidden by the post's author - find out more
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.