JavaScript Hoisting
Sep 1, 2024
We Can’t See the Declaration of a variable in JS
for Eg:
Get Dhileep’s stories in your inbox
Join Medium for free to get updates from this writer.
INPUT :
OUTPUT:
- Where sampleName is used inside the function but it is printed outside the function Scope.
- Js will Automatically declare a variable It is mentioned as Js Hoisting



