Try a W3Schools JavaScript Exercise
here