I am developing this simple application which suppose to execute one function at a time. This code is written in javascript with the help of nodejs.
My Goal is to make function one to display the output first then only function two will display the output but both of this function must be run with one big function.
Here are my codes.
function combine(Human,Alien)
{
function one (Human)
{
TotalOne = Human + 5;
console.log(`The Number Of Human : ${TotalOne}`);
return TotalOne;
}
function two (Alien)
{
TotalTwo = Alien + 10;
console.log(`The Number Of Alien : ${TotalTwo}`);
return TotalTwo;
}
}
combine(1,3);
The output does not seems to be reading the function inside the big function. Any ideas on how to solve this ?
Thanks :)