javascript creating a list to access random elements and the pop out value that was used code example
Example 1: get random item from array javascript
const randomElement = array[Math.floor(Math.random() * array.length)];
Example 2: get random element from array js
var item = items[Math.floor(Math.random() * items.length)];