0
   

javascript loops for

 
 
Reply Tue 21 Nov, 2017 08:17 am
write a program user input value display the table of 2 or any other on the display screen
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 558 • Replies: 1
No top replies

 
AngleWyrm-paused
 
  1  
Reply Wed 22 Nov, 2017 12:53 pm
@vartul agnihotri,
for loops are used when it is known ahead of time how many times to do the loop. The situation presented in the problem has an unknown number of entries, and so a for loop is not a good choice.

A while loop is the thing to use. while the user hasn't indicated they are done, take another input and add it to a collection.
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » javascript loops for
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 10/15/2019 at 08:44:44