bjmj3964 bjmj3964
  • 14-07-2019
  • Computers and Technology
contestada

What is variable hoisting in JavaScript? Provide examples.

Respuesta :

Limosa
Limosa Limosa
  • 21-07-2019

Answer:

before executing a code using javascript hoisting we can move any variable declaration to the top of the scope in a code.

Explanation:

It is to be remembered that hoisting works with declaration not with initialization.

example:

//initializing a variable s

var s = 2;

t = 4

elem.innerHTML = s + " " + t;           // Display s and t values

// initializing a variable for hoisting

var t;

Answer Link

Otras preguntas

Estimate the difference of $19 320 and $9 876?​
how can students help in thevdevelopment of peace culture​
The name of Henry Clay's plan to improve the nation's economy was called the ________ System.answer is American
what is photosynthesis​
-10x + 2y = 12 What is each equation in slope intercept form
Is this answer right? If you're a genius then answer this​
The total length of 5 belts and 3 shoe laces is 4.2 m. The total length of 3 shoe laces is equal to the length of 2 belts a) Find the length of a belt b) Find t
I need help please. Ignore the top part that show all the foods. Just so you know this is for Spanish.
what was the issues of the 1896 presidential election?
I need help on 3-6a=9-6a