Array.prototype.splice() arrayLikeconsoleprototypearrayLike// [ 5 ]console.log(arrayLike);// { '0': 2, '1': 3, '3': 4, length: 4, unrelated: 'foo' } Specification ECMAScript® 2026 Language Specification #sec-array.prototype.splice...
Note that string is a primitive type in JavaScript, so strings are immutable. String.prototype.splice will return the modified string, instead of modifying the original string, as opposed to Array.prototype.splice, which modifies the original array on which the method is called. Readme Keywordsno...