menjalankan fungsi dalam fungsi javascript
function runFunction() {
myFunction();
}
function myFunction() {
alert("runFunction made me run");
}
runFunction();
Lava
function runFunction() {
myFunction();
}
function myFunction() {
alert("runFunction made me run");
}
runFunction();
// we create a function by typing the keyword " function" + Function's name and ( we add the parameter here )
// {
// the function body
// }
// we call the function by typing it's name without the keyword and we add ()
function second (name){
name = "Elmustafa";
alert(name);
}
first();
// calling our function
displayGreeting();