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

which number indicates the Aztec Empire ?​
If a person has two blood type A parents could the child be blood type 0? A Yes B.No
Choose the correct form of the verb. Nosotras, las vendedoras, __________ en los clientes. Your answer: piensa pensamos pienso piensan
Please help this is a test!!!! The expression 6(x-5) means the__. If x=7, the value of the expression is __. 1.- A. Sum of 6 and the sum of x and 5. B. Product
Create three questions for "The Lottery." 1 literal, 1 interpretive, and 1 evaluative. answer this pls!
Why did the Americans go to China? A. land B. trading C. live stock D. exploration
19. Two sets of the sum of a number and eight are added to five times the same number. ​
What are the Terms for 8x+6
200 children attended the school play. Of the total attendance, 40% were boys. How many boys attended the play
help please fast i’ll mark brainlist