Loops in Javascript | what is loops? | Javascript 2020
Loops in Javascript Loops In Javascript | Loop Statements is use to create a loop. Basically in Programming loop mean the repeatation of statements. So basically loop statements in Javascript is use to make the statement repeat. What is the use of Loops? Loops basically use to repeat a statement. For example, if we got task that print "hello world" 100 time, instant of typing "hello world" 100 we will simply use loop and we will write the statement only one type. There are many uses of loops like initialization of data for array etc. While Loop While loop is the type of loop which is use to repeat the statement on the basis of condition. While loop will stop only if its condition is false otherwise it will be an infinity loop. For example if we want to print 100 pages on printer only if the pages is save if not it will be terminated. Syntax while(condition) { Block of Statements } In the above syntax if the condition is true the block of statement will be ex