javascript call function inside function code example
Example 1: does a function inside a function need to be called?
function outer() {
// when you define it this way, the inner function will be accessible only from
// inside the outer function
function inner() {
alert("hi");
}
inner(); // call it
}
Example 2: running a function in a function javascript
function runFunction() {
myFunction();
}
function myFunction() {
alert("runFunction made me run");
}
runFunction();