Trying to shuffle to generate a random number from an array and splice, but keep getting undefined for the last element that's left in the array
问题 Here, I can generate random numbers that do not repeat. Below is the code for the same. <body> <div id="bingo"> <script> let numbers = new Set() .add("B1") .add("B2") .add("B3") .add("B4") .add("B5") .add("B6") .add("B7") .add("B8") .add("B9") .add("B10"); let called = Array.from(numbers); let display = new Array(); function getRandomNum() { function rando() { for (let i = called.length - 1; i > 0; i++) { const j = Math.floor(Math.random() * called.length); const number = called[i]; called[i]