Javascript: Storing and Sorting Data with Arrays -


i beginner , need programming assignment.

need prompt. 10 names input user (string inputs). put names array , write out webpage.

my question how save input in array, when prompt has displayed on , on again each name user enters name? also, depending on how many names user wants enter, user has choice of quitting prompt typing in letter 'q'. quite proficient @ coding while , loops, not @ coding arrays. tried search online couldn't find answer.

i love if explain how it. thanks!

i suggest following solution:

// create new array 10 default values:  var result = new array(10).fill('');    // fill array names via prompt():  eval(((a, b = ['x => x' + '.' + '\n' + 'so\x6de']) => b + '\x28' + + '\x29')((a, b) => 'q' == (x[b] = prompt())))(result);    // print result:  console.log(result);