What is JavaScript Hoisting explained for beginners

preview_player
Показать описание
Today we will talk about what is javascript hosting.

Hoisting is the mechanism that lifts all declared variables and functions as well, to the top of their local scope or at the top of the global scope if they are placed in the global scope.

In Javascript, it's possible to declare a variable after it's used. Hoisting is used to avoid undefined errors because otherwise, code with variable or function might be executed, but it's not defined.

Remember to declare your variables first to make sure your code won't have any issues with undefined values.

SUBSCRIBE our channel and let's start!

For written article and code examples VISIT US on:

MEET US:

#hoisting #javascript #js
Рекомендации по теме
Комментарии
Автор

Thank you Mam Explaining Hosting in JS.
Please Mam Start React Js tutorial Video, i am waiting.

mohammedqadir