3
Reply

What is Function Hoisting ?

Atul Sharma

Atul Sharma

Jan 10, 2017
626
1

    you are using function before declaring it.

    Naveen Bisht
    February 16, 2017
    0

    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.

    Atul Sharma
    February 10, 2017
    0

    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.

    Atul Sharma
    January 10, 2017
    0