Strings are not copied in JavaScript

What is really stored inside variables in JavaScript?

The illustration borrowed from https://www.html5rocks.com/en/tutorials/memory/effectivemanagement/

Everyone knows that when an object is assigned to a variable, the object value is saved somewhere in memory and the target variable is assigned the reference to the object location in memory. If the reference is assigned to another variable and then any of the two variables…

--

--

Java, JavaScript and SQL developer. Interested in data collection and visualization. Comment and disagree with my personal notes on tiny problems that I faced.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marian Čaikovski

Java, JavaScript and SQL developer. Interested in data collection and visualization. Comment and disagree with my personal notes on tiny problems that I faced.