3 ms·
> For example even though `s.slice(1)` is a "copy" most engines (I believe V8 included) will use the same backing string for both. That’s not a copy, it skips
by koolba 4y ago
> For example even though `s.slice(1)` is a "copy" most engines (I believe V8 included) will use the same backing string for both.
That’s not a copy, it skips the first character!
- kevincox 4y agoIt's semantically a copy of most of the string.