I`m having some issue with Javascript. We just started to study it a couple weeks ago and I have to do a work for class:
Need to do a prompt. get 10 numbers input (10 gr
Just try to ask them to input their numbers or grade, separated by a comma and then you can split on it.
var arr = prompt("Enter your numbers").split(",")
Or, ask prompt
ten times
var arr = [];
for(var i = 0; i < 10; i++)
arr.push(prompt("Enter a number");
If you want them to be numbers, just prefix prompt
with +
, so it becomes a number(provided they're actual numbers) or just do
arr = arr.map(Number);