Hoisting in JavaScript
OnHoisting, when in JavaScript variable used before declaration that is called hoisting, a variable can be declared after it has been used. In other words; you can say one variable can be used before it has been declared. example a = 10;…