Skip to content
Loading
0
  • Puneet Kankar
    0
    for (i = 0; i < 5; i++) {text += "The number is " + i + " "; }
    0
  • Amit Kumar Singh
    0
    Their are diffrent kinds of loop could you tell me which loop you are talking about.
    anyways you can visit the following link given below to understand all kinds of loop in javascript.
     
    https://www.w3schools.com/js/js_loop_for.asp 
    0
  • Karthik Elumalai
    0
    Simple for loop in javascript:
     
    Syntax:
     
    for (initialization; test condition; iteration statement)
    { Statement(s) to be executed if test condition is true }
     
    Example:
     
    for(count = 0; count < 10; count++)
    {
    document.write("Current Count : " + count ); document.write("
    ");
    }
     
    Source:https://www.tutorialspoint.com/javascript/javascript_for_loop.htm
     
    Hope the above code helps, thanks
    0