MCQs > IT & Programming > JavaScript > What's the output? var a = [1, 2, 3]; delete a[1]; alert(a[1]);

JavaScript MCQs

What is the result of the following code snippet?

var a = [1, 2, 3];
delete a[1];
alert(a[1]);


Answer

Correct Answer: An alert box pops up displaying "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