Acefone interview question

What is hoisting in Javascript ?

Interview Answer

Anonymous

17 Dec 2024

Hoisting is a default behaviour of JavaScript where can use variables or functions in your code before you declare them. Example : console.log(a); // undefined (hoisted but not initialized) var a = 10; console.log(a);