Created
March 24, 2015 21:33
-
-
Save julienetie/06746ac9a245445efc67 to your computer and use it in GitHub Desktop.
Get Numbers From Array
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
// Get Numbers From Array | |
Array.prototype.getArrayNumbers = function(){ | |
var _this = this; | |
for(var i = _this.length; i--;){ | |
if ( typeof(_this[i]) !== 'number' ) _this.splice(i, 1); | |
} | |
return _this; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment