How do we use array to get 5 values from the user and find their percentage in javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do we use array to get 5 values from the user and find their percentage in javascript

How do we use array to get 5 values from the user and find their percentage in javascript. Your help will be good

31st Oct 2017, 8:19 PM
Didace Nsabimana
Didace Nsabimana - avatar
2 Answers
+ 1
Use prompt to take the value, push it into an array, then take the sum and divide it by the length. There you go: https://code.sololearn.com/W22MO6edPuqe/?ref=app
31st Oct 2017, 8:44 PM
Witty Phantom
Witty Phantom - avatar
+ 2
Thanks 👍
16th Mar 2018, 11:29 PM
Didace Nsabimana
Didace Nsabimana - avatar