Assessment wanted for Functions 1 skill test - random name generator

Hi, I tested my code and it worked, I’m just wondering if I can get some advice on it please and you tell me is it correct or not! Thanks so much in advance.
CODEPEN Link

Hello @Ghazaleh_Heravi

you doing great well done
just a notice

let length = names.length-1; 
Math.floor((Math.random()*(length+1)));

you can set length to names.length nt need to subract 1 as you add that one later in the second line

hope that help and have a nice day :slight_smile:

thank you so much for your help and time @justsomeone

you very welcome :slight_smile: