choobakka 0 Posted March 25, 2006 Report Share Posted March 25, 2006 is it possible to have an if/else statement within a 'for' statement?if so what is the default syntax becuase i keep getting errors!thanks in advance Quote Link to post Share on other sites
Webworldx 0 Posted March 25, 2006 Report Share Posted March 25, 2006 for(i=0;i<array.length;i++){ if(array[i] == "something") { } else { }} Quote Link to post Share on other sites
SillyBilly 0 Posted March 26, 2006 Report Share Posted March 26, 2006 is it possible to have an if/else statement within a 'for' statement?if so what is the default syntax becuase i keep getting errors!thanks in advance<{POST_SNAPBACK}> Try this tutorial, especially the link to part of page 5 where you will find a example of a nested loop using for, if, and else. You might want to review page five of the tut as it builds up the Conditional Statements and Loops.Nested Condition Statements and Loops Quote Link to post Share on other sites
manick 0 Posted March 28, 2006 Report Share Posted March 28, 2006 Hi Choobakka, You're not doing the OU TT281 course by any chance are you??????Nick T Quote Link to post Share on other sites
choobakka 0 Posted March 28, 2006 Author Report Share Posted March 28, 2006 No No. lolwhere r u from?im from london Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.