Originally Posted by Mindphaser
here's the quote:
Math.floor(Math.random()*array.length) will return an index between 0 and the largest array index.
Math.ceil in the same expression will never return array and will occasionally return array[array.length], which is one more than the largest array item, and an error if you don't catch it.
That is what I told you.
Your clock code is just too antiquated to be believed. Internet Explorer 4 and Netscape 6 have long been one with Nineveh and Tyre.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.