<body> <script language="JavaScript"> var max = parseInt(window.prompt("How many times?","5")); var cnt = 1; while ( cnt <= max) { if(cnt % 2 == 0) document.write(cnt+" play it again, Sam<br>"); cnt = cnt+1; } </script> </body>