js adding a function into another function code example
Example: function inside function javascript
function getFullName() {
return getName() + ' ' + getLastName();
function getName() {
return 'William';
}
function getLastName() {
return 'Wallace';
}
}
console.log(getFullName());
//William Wallace
console.log(typeof getFullName);
//function
console.log(typeof getName);
//undefined
console.log(typeof getLastName);
//undefined