MCQs > IT & Programming > JavaScript > What will be printed after execution of following JavaScript code? var var1 = 10; document.write('First Value: ' + var1 + ' and Second Value: ' + var2); var var2 = 20;

JavaScript MCQs

What will be printed on the standard output console on the execution of the following JavaScript code?

var var1 = 10;
document.write("First Value: " + var1 + " and Second Value: " + var2);
var var2 = 20;


Answer

Correct Answer: First Value: 10 and Second Value: undefined

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it