Assessment wanted for functions test 1

please help me assess my functions test 1. I can’t say I completely understand all that is taught in the functions topic.
the link…

the page…

Hello @miracle_ugorji

let para = Math.floor(Math. random() * names.length);
print(chooseName);

para is a p element and already declared earlier you do not need to declare it again and you need to set it textcontent to the name

you need to get random item from the array names so you use

para.textContent = names[Math.floor(Math.random() * names.length)];

after that you need to call the function

chooseName();

of course after the closing curly bracket

and i am not sure what print (para) should do
hope that help and have a nice day

1 Like