In JavaScript, a variable can be declared after it has been used.In other words; a variable can be used before it has been declared.JavaScript only hoists declarations, not initializations.
you are using function before declaring it.
console.log("From calling "+myFunction()); function myFunction() { console.log("From function "+ " Function Hoisting !!!"); return "Function Hoisting !!!"; }Output - From function Function Hoisting !!! From calling Function Hoisting !!!So, you can call a function (myFunction()) even before declaring it. This is called Function Hoisting in JavaScript.