Vidyalelo
JavaScript · Q10

Parsing, Benchmarking And Logging

Programming · JavaScript · question 10

Q10

What is the meaning of JavaScript Hoisting?

A.
Moving declarations to bottom
B.
Moving declarations to top
Answer
C.
Hosting variables by itself
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
Hoisting is JavaScript’s default behavior of moving declarations to the top. In JavaScript, a variable can be declared after it has been used) In other words; a variable can be used before it has been declared.