What will be the output of the code below? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What will be the output of the code below?

var Y = 1; if (function F(){}) { y += Typeof F;</span> } console.log(y);

12th Nov 2019, 7:47 AM
Ravi Kumar
Ravi Kumar - avatar
1 Answer
+ 4
Definitely errors... Like "y is not defined"....to fix this....change 'y' to 'Y' also Typeof : it should be like this typeof() .I dont know why u used </span> over there...it just doesn't belong there
12th Nov 2019, 8:04 AM
Rohit Singh
Rohit Singh - avatar