I'm jessi and I'm a web development student. I'm trying to write a program with arrays and I'm stuck. I have an array of phrases and when a user enters a number between 1 and 10 it is supposed to show that many phrases on the screen but I'm stuck. I don't know how to display multiple results on the screen. I'd really appreciate any help. Thanks.
<!DOCTYPE html> <html> <head> <title>Get A Response</title> </head> <body> <form> <h1>Select how many phrases you want displayed.</h1> <input type="number" class="userInput"></input> <button type="submit" value="submit" onclick="showme()"></button> </form> <div class="myphrases"> </div> <script src="js/main.js"></script> </body> </html> ////////////////// Javascript function showme() { var number = document.querySelector('.userInput').value; var display = ""; var phrases = [ "Hello there", "What's up Doc", "Because I said so", "Say it again", "It's a celebration", "Enjoy yourselves", "Welcome", "Where did you go", "Why you crying", "Stop playing"]; var random = Math.floor(Math.random() * phrases.length); for(var i = 0; i < phrases.length; i++) { } }