I have an assignment in JavaScript to get a random number and display the random number which is no problem. How ever I have to attach an array to the random number to display the same number of items from the array that match that random number. My problem comes in with the odd numbers of the array items displaying correctly. For instance, if my random number is a 7, I will only get 6 items from the array. What can I do to fix this?
Aucun commentaire:
Enregistrer un commentaire