what is hoisting in javascript?
Hoisting is a variable or function's default behavior before declaring in the code. example getName(); console.log(x); var x = 7; function getName() { console.log("Namaste Javascript"); }

- Hoisting is a variable or function's default behavior before declaring in the code. example
getName();
console.log(x);
var x = 7;
function getName() {
console.log("Namaste Javascript");
}