Quiz: Hoisting in JavaScript

Consider the following code:

var x = 100;

function run(){

	console.log( x );
	var x = 200;

}

run();

You will have 5 minutes to answer the next question, so spend a few minutes to study the code and understand what’s happening.

Leave a Reply