Can I run two for loops in one statement in javascript? Would I do it like this?
for(initialize1,initialize2; condition1,condition2; incrementation1,incrementation2)
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.
Yes you can do a for loop like that, but you have one and just one condition for check. If you can make it check just a one condition for all of your variables for example an And (&&) conditional expression this will work fine, or if you just use the other variables for do something else it will work fine too.
Try it:
@samdonly1
Always you will have just one evaluation, but you can do something like this:
In this case you can check your variables i, j, k in other function and decide if the loop stops or goes on.