In Association with Amazon.in   Flipkart

Monday, September 30, 2013

JavaScript Function With no Arguments and no Return Type

<head>
<script>
// Function With no Arguments and no return type
    function line()  //  called function
    {
        document.write("<br/>**********################***********<br/>");
    }
</script>
</head>
<body>
    <script>
    line();   //  calling function
    </script>
    <h2>Welcome to JS</h2>
    <script>
    line();
    </script>
</body>


Output:


**********################***********

Welcome to JS


**********################***********

No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...