- Back to Home »
- JavaScript »
- JavaScript Part-9 Calling function in a function
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
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
Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks from every one of us.
ReplyDeleteBest AWS Training in Chennai | Amazon Web Services Training in Chennai
AWS Training in Bangalore | Amazon Web Services Training in Bangalore
Amazon Web Services Training in Pune | Best AWS Training in Pune
This comment has been removed by the author.
ReplyDeleteSuperb. 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.
ReplyDeleteangularjs Training in online
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
This is such a great post, and was thinking much the same myself. Another great update.
ReplyDeletepython training in tambaram | python training in annanagar | python training in jayanagar
Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often.
ReplyDeleteData Science Training in Chennai | Data Science course in anna nagar
Data Science course in chennai | Data science course in Bangalore
Data Science course in marathahalli | Data Science course in btm layout
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.
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training