This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

A simple JavaScript program


<html>
          <head>
               <title>Factorials</title>
          </head>
       <body>
               <h2>Table of Factorials</h2>
               <script>
                       var fact = 1;
                       for(i = 1; i < 10; i++) {
                       fact = fact*i;
                       document.write(i + "! = " + fact + "<br>");
                       }
              </script>
        </body>
</html>

Task Discussion