Skip to content

Commit 433a109

Browse files
author
Dronca Raul
committed
Calling a Function From Another Function
1 parent a859223 commit 433a109

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

JavaScript/10_Functions(5).js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// First Example
2+
function doFirst() {
3+
document.write("I am first bo!");
4+
}
5+
6+
function doSecond() {
7+
document.write(" 222222!!! ");
8+
}
9+
10+
function start() {
11+
doFirst();
12+
doSecond();
13+
}
14+
15+
start();
16+
17+
// Second Example
18+
function doFirst() {
19+
document.write(" first! ");
20+
doSecond();
21+
}
22+
23+
function doSecond() {
24+
document.write(" second! ");
25+
doFirst();
26+
}
27+
28+
doFirst();

0 commit comments

Comments
 (0)