js-14.htm - counted loop
Please look at the source and developer console.