If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

<body>
<p>&nbsp;</p>
<h1>WDV221 Intro Javascript</h1>
<h3 align="center">Javascript Loops</h3>
<p>Topics: loops, for loops, while loops, sentinels!</p>
<p>Place all script code on this page.</p>
<p>1. Create a function that will ask you for a number until you enter 999 which will end the loop. You do not need to display the number. </p>
<p>2. Create a function that will ask you for a name until you tell the function that you do not have any more names. After you enter each name it will ask you if you have more names to enter. If you enter yes the process will continue. Display each name at the end of the following sentence.</p>
<p>The name you entered is: </p>
<p>3. Create a runtime script that will use a prompt( ) to accept how many products will be displayed. Use a for loop to display &quot;Product Name&quot; and the product number as a &lt;p&gt; element.</p>
<p><strong>Example output:</strong></p>
<p>Product Name 1</p>
<p>Product Name 2</p>
<p>...</p>
<p>4. Create a runtime script that will use a nested for loop to create a table with 3 rows and 5 cells. Place the same number or a letter in each cell. </p>
<p>Hint: Write a table in HTML. Do a row first then do multiple rows. </p>
<p>5. Create a function called totalSales( ) that will ask the user to enter an amount until you enter &quot;done&quot;. Add those amounts together and display them in an alert when the user is done entering amounts..</p>
<p>Have fun!!</p>
</body>
</html>