...that would be visible in the implementation of +=... This though would mean that the interpreter would know the number of references to the string at the time of concatenation and make the copy if there are more than one references... It all depends how assignments and garbage collect work...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
...that would be visible in the implementation of +=... This though would mean that the interpreter would know the number of references to the string at the time of concatenation and make the copy if there are more than one references... It all depends how assignments and garbage collect work...