In PHP, Java, C++ (and many other languages), for loops are used like this:
for(int i=0;i<10;i++)
If I already initialized i, how can I omit the initialization statement?
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.
In Java, C++ and PHP it is completely valid to omit the initialization portion of the
forloopThis is true of most languages which have a
forloop structure