Explore BrainMass

JavaScript - Loops

I have been working on this all day and am still having trouble with the following:

1) Even should only be reading for the FOR Loop. I tried moving it around and it won't work so I don't know how to fix it to not show on the DO..WHILE Loop and the WHILE Loop.

2) I have to add an Odd next to the odd numbers in ONLY the BACKWARDS FOR Loop.

3) BACKWARDS FOR Loop has to be on a separate page with a link to the Loops.html page.

4) Loops.html page has to have a link to the Backwards Loops.html page

5) Both pages have to be in color

I added what I thought were the codes for all of the above, however, neither one will run. I don't know what I'm doing wrong!!

Can you please help???


Solution Preview

See attachments. Problem in your scripts:

1) You had duplicate BODY tags. This tag can only exist once
2) You were missing a "}". Curly braces should be in matched pairs
3) You had a sting indicated with a single-quote at the beginning and a double-quote at the end. Always use ...

Solution Summary

A working HTML example that includes all three loop times and determining if the numbers are odd or even