<body> <script> window.onload = function() { for (var ghost = 20; ghost <= 40; ghost++) { alert(ghost); } }; </script> </body>