Consider following code:
var str;
var i = '0';
console.log(str+i);
What will be printed to the console?
Explanation
Variable str declared but no value was assigned. Technically it has the value of undefined. Example:

var name;
console.log(name); // undefined
name = "James";
console.log(name); // "James"

Follow CodeGalaxy

Mobile Beta

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