What will be the value of a variable after executing the following code?
 
var a = 5; 
var a;
 
Explanation
The code
var a;
is hoisted to the top by the compiler.
Read more: hoisting

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes