Posted by : Sudhir Chekuri Saturday, 10 March 2018

Two functions named as first and second are created then i called both functions in other function called start.

On the page load "start function" will be called when script is executed. Start function will call "first function" and then "second function".

Javascript example code for calling function in a function:

<!DOCTYPE html>
<html>

  <head>
 
   <script type="text/javascript">
      function First()
      {
        document.write("I am first function ")
      }
      function Second()
      {
        document.write("I am second function")
      }
      function start(){
        First();
        Second();
      }
      start();
    </script>
 
  </head>

  <body>
   
    <h1>Hello World!</h1>
  </body>

</html>

Output:

I am first function I am second function

Hello World!



{ 6 comments ... read them below or Comment }

  1. This comment has been removed by the author.

    ReplyDelete
  2. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.

    angularjs Training in online

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

    ReplyDelete
  3. This is such a great post, and was thinking much the same myself. Another great update.
    python training in tambaram | python training in annanagar | python training in jayanagar

    ReplyDelete
  4. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -