basic: array building using TO and STEP

This commit is contained in:
minjaesong
2020-11-15 11:35:47 +09:00
parent b2da296602
commit 7774433e18
2 changed files with 64 additions and 22 deletions

View File

@@ -282,6 +282,15 @@ if ('function' !== typeof Array.prototype.reduceRight) {
return value;
};
}
if (!Array.prototype.includes) {
Array.prototype.includes = function(e) {
var k;
for (k = 0; k < this.length; k++) {
if (e === this[k]) return true;
}
return false;
}
}
if (!Object.entries) {
Object.entries = function( obj ){
var ownProps = Object.keys( obj ),