DEV Community

Domnic Omondi
Domnic Omondi

Posted on

Hoisting in Javascript

Hoisting is the ability of javascript interpreter to call functions,variables or classes before they appear in the code or before execution of the code.
Hoisting allows you to use functions, variables or classes before declaring them.

example with Hoisting
Image description

How you would write the same code without HOISTING

Image description

Top comments (0)