Home | Mailing List | Blog | Tutorial Videos

Lexical Scope

Fun Lexical Scope! What do you think will be printed?

function printSomething() {
	console.log( something );
}

function invokePrintSomething() {
	var something = 3;
	printSomething();
}

var something = 2;

invokePrintSomething();

Select one: