<p></p>
<section class="preview">
</section>
const names = ['Chris', 'Li Kang', 'Anne', 'Francesca', 'Mustafa', 'Tina', 'Bert', 'Jada']
const para = document.createElement('p');

function random(min,max){
return Math.floor(Math.random() * (max - min) + min);
};

function chooseName(arr){
return arr[random(0,arr.length)];
}

para.textContent = chooseName(names);


// Don't edit the code below here!
const section = document.querySelector('section');
section.innerHTML = ' ';

section.appendChild(para);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.