let names = ['Chris', 'Li Kang', 'Anne', 'Francesca', 'Mustafa', 'Tina', 'Bert', 'Jada']
let para = document.createElement('p');
// Add your code here
function random(0,7){
const num = Math.floor(Math.random() * (7 - 0)) + 0;
return num;
}
function chooseItem(names) {
let choice = names[random(0, names.length)];
return choice;
}
para.textContent = chooseItem(names);
// Don't edit the code below here!
section.innerHTML = ' ';
section.appendChild(para);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.