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; } } }