0
How to add element in array in js from user
6 ответов
+ 7
Do you mean this:
https://code.sololearn.com/Wl9F533JsF9u/?ref=app
+ 5
You can try this code.
This code will take elements separated by spaces and add them to array:
var arr = [...prompt().split(' ')]
console.log(arr)
+ 3
Thanks
+ 3
Actually I was making a program of average in js where i want user to enter any number of value in single textbox
+ 3
Thanks for the help