[1, 2, 3]

, 3.[1, 2, 3]

, 4.

[0, 0, 0]

">
MCQs > IT & Programming > JavaScript > What will the following code snippet log in the console? let arr = [1, 2, 3]; for (i = 0; i < arr.length; arr[i++] = 0) ; console.log(arr);

JavaScript MCQs

What will the following code snippet log in the console?

let arr = [1, 2, 3];

for (i = 0; i < arr.length; arr[i++] = 0) ;

console.log(arr);


Answer

Correct Answer:

[0, 0, 0]

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