Function Read Assignment

Print out this following code and predict the Output for the following program.   Turn this paper in before class on May 8.      

function one(a,b)
       {
         
           var c=a-1;
           document.write(“yes” + a + b + c + “<br>”);
           a=b+1;
           c=c-1;
           document.write(“no” + a + b + c + “<br>”);
           return a;         
       }
 
       function two(b,c)
       {
           b=b-1;
           a=7;
           document.write(“first” + a + b + c + “<br>”);
           c=one(b,a);
           document.write(“last” + a + b + c + “<br>”);
       }
 
       a=3;  b=5;  c=9;
       document.write(“one” + a + b + c + “<br>”);
       b = one(c,a);
       document.write(“two” + a + b + c + “<br>”);
       two(a,c);
       document.write(“three” + a + b + c + “<br>”);

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>