Last active
February 7, 2020 05:43
-
-
Save stleamist/42715fd5b5d71f7d48656d606fa62608 to your computer and use it in GitHub Desktop.
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
Array.prototype.replace = function(replacingArray, startIndex = 0) { | |
const replacedArray = this.slice() | |
Array.prototype.splice.apply(replacedArray, [startIndex, replacingArray.length].concat(replacingArray)) | |
return replacedArray | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment