When the V8 engine runs a script that refers to multiple string literals with the same contents, will it create a single location in memory for the string, towards which all the expressions will point to? Or will a separate memory location be allocated for every expression?
For instance, consider this little script:
let a = "asdf"
let b = "asdf"
After this runs, in the engine's internal representation of the variables, will a and b refer to the same location in memory?
(Bonus question: Is this behavior the same in other JavaScript engines, such as Internet Explorer's?)