Hoisting in JavaScript is a behavior in which a function or a variable can be used before declaration.
Example:
console.log(name); // undefined
var name = 'Shubham Prajapat';
Hoisting in JavaScript is a behavior in which a function or a variable can be used before declaration.
Example:
console.log(name); // undefined
var name = 'Shubham Prajapat';