Last active
December 28, 2015 22:14
-
-
Save shuhrat/4174462 to your computer and use it in GitHub Desktop.
Array challange
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.tail = function() { | |
return Array.prototype.concat.apply(this, this); | |
} | |
Array.prototype.dublicate = function() { | |
var dublicated = [], | |
length = this.length; | |
for (var i=0; i<length; i++) { | |
dublicated.push(this[i], this[i]); | |
} | |
return dublicated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment