I understand I could and probably should use substring
:)
For educational reasons, I want to know why I can't use call
to do a splice operation on a string, which I understand to be an array-like object. It seems like this should work:
Array.prototype.splice.call('filename.jpg', -3, 3).join(''); // return the last three chars
Throws error TypeError: Object.isSealed called on non-object
in V8.