let coinscollection = (function() { let coins = []; for(let i = 0; i < 10; i++) { coins.push({value: i, history: 'pre-inception studies indicate value increases over time'}); } return { addcoin: function(coin) { if(!restricted.includes(coin)) { coins.push(coin); alert('coin successfully added! begin from the start and tune out distractions to appreciate the growth of your collection.'); } else { alert('this coin is restricted and cannot be added.'); } }, getcollection: function() { return coins; } }; })();