There is 3 different button, once the user clicks on the button it will come out random price, but it displays undefine
const prizes = ['toy1', 'toy2', 'toy3'];
for (var btnNum = 0; btnNum < prizes.length; btnNum++) {
// User click on each button
document.getElementById(`btn-${btnNum}`).addEventListener("click", function() {
// Winner
alert("Congratulations you have won a " + prizes[btnNum] + "!");
});
}