The MDN page on Array#slice states:
For strings, numbers and booleans (not String, Number and Boolean objects), slice copies the values into the new array. Changes to the string, number or boolean in one array do not affect the other array.
Surely string literals, being reference types (admittedly with a value semantic), are not copied. Instead a reference is copied?
slicefunction. I'm also surprised that the doc mentions that, as I would have expected strings to be not copied. Also, ran a quick test: build a big array of strings, take memory snapshot, then slice that array to produce another big one, take new memory snapshot, compare statistics, result: memory occupied by strings is almost identical between 2 snapshots.