0
Why we are executing the function names despite having the consol.log() statement?
Previously document.write() or console.log() was enough to show the output without executing any function names? We are using varTest() and letTest() end of this code to get the desired output.(ES6) https://code.sololearn.com/W1a0NCSG3WDI/?ref=app
1 ответ
0
In the top of the script, you ***define*** the function.
The last 2 lines ***call*** the functions, that means they are executed when you run the code.
Simply defining a function doesn't execute it. If you removed the last 2 lines, you wouldn't see any output.