Hi Abdel, nice content. However, seems like the first example and the underlying content doesn’t match. Apart from that i have one query, do these primitive wrapper objects are Mutable?
Full stack software engineer with a flair for creating elegant solutions with the least amount of time.Exceptional problem solver with an aptitude for troubleshooting and the ability to quickly master
Hi Rohtash, sorry for the confusing, I updated the example. Regarding your question, Objects, in general, are mutable, so primitive wrapper objects are considered mutable as well, but even if you tried to modify it, it will be useless and you will not notice it because javascript performs these steps when primitive wrapper are created:
Create an object of a corresponding type.
Call a specific method on the instance.
Delete the instance immediately.
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.
Hi Abdel, nice content. However, seems like the first example and the underlying content doesn’t match. Apart from that i have one query, do these primitive wrapper objects are Mutable?
Hi Rohtash, sorry for the confusing, I updated the example. Regarding your question, Objects, in general, are mutable, so primitive wrapper objects are considered mutable as well, but even if you tried to modify it, it will be useless and you will not notice it because javascript performs these steps when primitive wrapper are created: