Aryan PrajapatKnowledge Contributor
What are all the loops available in JavaScript?
What are all the loops available in JavaScript?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
The available loops available in JavaScript are given below:
For loop statement:
The JavaScript For loop is the same as for loops of Java and C. For loop continues until a specified condition evaluates to false.
Ex:
for(int i=0; i<=3; i++)
While loop:
A while statement executes its statement until a specified condition evaluates to true, a while statement looks like as follows:
Ex:
while(Condition)
Statement
do-while loops:
The do-while loop continues until a specified condition is false.
Ex:
do
statement
while(Condition)