var groceries = [ 'milk', 'coriander', 'cucumber', 'eggplant' ] let mygroceries = groceries[Math.floor(Math.random() * groceries.length)] console.log(mygroceries)//This gives you any string from groceries