function chooseName() { let randomName = names[Math.floor(Math.random() * names.length)]; para.innerHTML = randomName; } chooseName();