Created
May 20, 2018 10:29
-
-
Save valerymelou/1733bcfd02ab33e54a842006e83f3f34 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.decimalfy = function() { | |
for (var i = 0; i < this.length; i++) { | |
this[i] = this[i].toFixed(2); | |
} | |
}; | |
var digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
for (var index in digits) { | |
console.log(digits[index]); | |
} | |
/** | |
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
function() { | |
for (let i = 0; i < this.length; i++) { | |
this[i] = this[i].toFixed(2); | |
} | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment