function in a function code example
Example 1: how to make a function
function myFunction(){
console.log('hi')
}
myFunction()
Example 2: define function in javascript
/* Declare function */
function myFunc(param) {
// Statements
}
function myFunction(){
console.log('hi')
}
myFunction()
/* Declare function */
function myFunc(param) {
// Statements
}