MCQs > IT & Programming > JavaScript > Consider the code snippet given below: var a = {a1: 1, a2: 2}; var b = 0; for (i in a) { b += a[i]; } Which is true?

JavaScript MCQs

Consider the code snippet given below:

var a = {a1: 1, a2: 2};
var b = 0;
for (i in a) {
  b += a[i];
}

Which of the following statements is(are) true?


Answer

Correct Answer: b == 1

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

More JavaScript MCQ Questions

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it