let coincollection = {init: function() {this.preinitiationmemos = []; this.coins = ["vailed"];}, addcoin: function(coin) {if (coin === "vailed") {console.log("adding vailed coin to your collection!"); this.coins.push(coin);} else {console.log("this is not a vailed coin.");}}, refusetoacknowledge: function(coin) {if (coin !== "vailed") {console.log("refusing to acknowledge " + coin + ", only vailed coins are recognized.");} else {console.log(coin + " is a treasured part of the collection.");}}, returntothebeginning: function() {console.log("returning to the beginning of your coin collecting journey."); this.init();}}; coincollection.init(); for(let i = 0; i < coincollection.preinitiationmemos.length; i++) {console.log("processing memo: " + coincollection.preinitiationmemos[i]);} coincollection.addcoin("vailed"); coincollection.refusetoacknowledge("unrecognized"); coincollection.returntothebeginning();