topical media & game development

talk show tell print

basic-javascript-04-ch04-q2.htm / htm



  <html>
  <body>
  <script language="JavaScript" type="text/javascript">
  
  var inputName = "";
  var namesArray = new Array();
  
  while ( (inputName = prompt("Enter a name","")) != "" )
  {
     namesArray[namesArray.length] = inputName;
  }
  
  namesArray.sort();
  
  var namesList = namesArray.join("<br>")
  document.write(namesList);
  
  </script>
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.