That'll only work once - you need the while loop
I don't know javascript (I'm a C++er), so can't help with the syntax. But, basically Derek, your first effort doesn't look too far off - it's just that your while condition is wrong - it'll only enter the loop when the entered number is equal tou your upper limit. Also you're not re-parsing the number you enter in the loop. And what happens if the entered number is less than 1?
Posted By: BerlinCanary on May 27th 2007 at 15:48:56
Message Thread
- Is anyone any good with JavaScript? Im rather stuck with some code (n/m) (General Chat) - Derek Acorah, May 27, 12:47:39
- Depends how complex your code is... (General Chat) - Ben, May 27, 13:56:25
- Its for my OU course.... (General Chat) - Derek Acorah, May 27, 14:13:41
- Sorry that code appeard fucked up, try this..... (General Chat) - Derek Acorah, May 27, 14:14:56
- hmm ok, its not appearing properly when i post the message =/ (n/m) (General Chat) - Derek Acorah, May 27, 14:15:32
- Try this..... (General Chat) - Trent_Canary, May 27, 14:22:41
- That'll only work once - you need the while loop (General Chat) - BerlinCanary, May 27, 15:48:56
- Thanks, i think that will be applicable to part (b) of the question so ill give it a shot (n/m) (General Chat) - Derek Acorah, May 27, 14:24:57
- Try this..... (General Chat) - Trent_Canary, May 27, 14:22:41
- hmm ok, its not appearing properly when i post the message =/ (n/m) (General Chat) - Derek Acorah, May 27, 14:15:32
- Sorry that code appeard fucked up, try this..... (General Chat) - Derek Acorah, May 27, 14:14:56
- Its for my OU course.... (General Chat) - Derek Acorah, May 27, 14:13:41
- Depends how complex your code is... (General Chat) - Ben, May 27, 13:56:25
Reply to Message
In order to add a post to the WotB Message Board you must be a registered WotB user.
If you are not yet registered then please visit the registration page. You should ensure that their browser is setup to accept cookies.