Knowledge Walls
Ammu
Hyderabad, Andhra Pradesh, India
Passcode:
Function with console in Examples of Javascript 1
591 Views
Example 
<!DOCTYPE html>
    <html lang="en-US">
        <head>
            <meta charset="UTF-8">
            <title>function1</title>
        </head>
        <body>
            
            <script>
                function sum(p1,p2){
                    console.log(p1);
                    var p3=(p1===undefined?0:p1)+(p2===undefined?0:p2);
                    return p3;
                    
                }
                console.log(sum());
                document.write("sum:"+sum()+"<br>");
                document.write("sum:"+sum(2)+"<br>");
                document.write("sum:"+sum(5,2)+"<br>");
            </script>
            
        </body>
    </html>
Next Topics
Next lessons of current book.
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Previous Topics
Previous lessons of current book.
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Best Lessons of "Javascript 1"
Top lessons which are viewed more times.
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details