Javascript - How to save prompt input into array

后端 未结 4 461
日久生厌
日久生厌 2021-01-23 10:12

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

4条回答
  •  走了就别回头了
    2021-01-23 10:47

    NUMBER_OF_INPUTS = 10;
    
    var i = 0;     // Loop iterator
    var userInput; // Input from user
    sum = 0; //initialise sum
    
    // Collect inputs
    for(i=0; i

提交回复
热议问题