Last time you learned about borrowing methods in JavaScript. In this tutorial we will talk about JavaScript hoisting. What Is Hoisting In JavaScript As you know, in JavaScript all variable…