cat_evilness
08-09-2002, 02:59 AM
Hey everyone,
First of all I'd just like to say Hi because I'm new to this forum. And secondly I was wondering if anyone could help me with a problem I have:
Ok, I've just started using JavaScript because I need it for my project at school. I'm making a virtual pet and I want to have variables that control it's mood: hunger, health etc. Anyway I was gonna have these variables controlled by a loop that counts down.
I'm use to writing loops in Basic where you would write:
FOR loop = 1 TO 10 etc.
But I have no idea how to write a loop that counts down from 10 to 1 in JavaScript.
If anyone knows could you please help me.
Thankyou,
Cat :confused:
Note: As this is essentially a continuation of the thread you started on the 8th, I've merged the 2 threads together to avoid confusion. For future reference, please keep threads regarding the same question together by posting further problems as replies to your original thread ;).
First of all I'd just like to say Hi because I'm new to this forum. And secondly I was wondering if anyone could help me with a problem I have:
Ok, I've just started using JavaScript because I need it for my project at school. I'm making a virtual pet and I want to have variables that control it's mood: hunger, health etc. Anyway I was gonna have these variables controlled by a loop that counts down.
I'm use to writing loops in Basic where you would write:
FOR loop = 1 TO 10 etc.
But I have no idea how to write a loop that counts down from 10 to 1 in JavaScript.
If anyone knows could you please help me.
Thankyou,
Cat :confused:
Note: As this is essentially a continuation of the thread you started on the 8th, I've merged the 2 threads together to avoid confusion. For future reference, please keep threads regarding the same question together by posting further problems as replies to your original thread ;).