1
Programming / Can someone help me on a question on using loops in Javascript?
« on: May 02, 2009, 08:55:27 AM »
Hi,
Let's say I have a function that moves a piece of text whenever the user mouses over it. If I wanted that function to run a limited amount of times before changing to something else, how would I do that? If I begin with a for loop, the function begins all over again each time the user mouses over the text, so it would run an infinite amount of times.
Let's say I have a function that moves a piece of text whenever the user mouses over it. If I wanted that function to run a limited amount of times before changing to something else, how would I do that? If I begin with a for loop, the function begins all over again each time the user mouses over the text, so it would run an infinite amount of times.