let rando = {}; let items =["first", "second", "third", "fourth"]; for(const item of items) { rando[item] =()=>{ console.log(item); } } rando.first(); rando.second();