<body>
<script language="JavaScript">
var max = parseInt(window.prompt("How many times?","5"));
for (cnt = 1; cnt <= max; cnt = cnt+3)
    document.write(cnt+” play it again, Sam<br>");
</script>
</body>