JS A1 course example

PHOTO EMBED

Thu Apr 29 2021 17:23:37 GMT+0000 (Coordinated Universal Time)

Saved by @benjaminb #ftp

Object.prototype.obCustom = function(a,b) {
    return (a+b);
};
Array.prototype.arrCustom = function() {}; 

const iterable = [3,4,7, test = {name: 'asasas'}]; 
iterable.foo ='hello'; 

for (const i in iterable) {
    console.log(i)

    for (const i of iterable) {
        console.log(i)

        Object.prototype.objCustom = function(a,b) {
            return a+b; 
        }
    }
}

content_copyCOPY