Sitemap
Dhileep

Dhileep

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:

  1. Where sampleName is used inside the function but it is printed outside the function Scope.
  2. Js will Automatically declare a variable It is mentioned as Js Hoisting

--

--