Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to choose a random name from a list in javascript

function chooseName() {
      let randomName = names[Math.floor(Math.random() * names.length)];
      para.innerHTML = randomName;
    }
    chooseName();
 
PREVIOUS NEXT
Tagged: #choose #random #list #javascript
ADD COMMENT
Topic
Name
5+6 =