This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A pure version of Array.prototype.splice | |
* It will return a new array rather than mutate the array | |
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | |
* @param {Array} array The target array | |
* @param {number} start Index at which to start changing the array | |
* @param {number} deleteCount An integer indicating the number of old array elements to remove | |
* @param {any} items The elements to add to the array, beginning at the start index | |
* @returns {Array} | |
*/ |
OlderNewer