MCQs > IT & Programming > JavaScript > What will be logged in console? const data = [{a: true, b: false}, {a: false, b: true}]; let result = false; let sample; while (sample = data.pop()) { result = sample.a; } console.log(result);

JavaScript MCQs

What will be logged in console? const data = [{a: true, b: false}, {a: false, b: true}]; let result = false; let sample; while (sample = data.pop()) { result = sample.a; } console.log(result);

Answer

Correct Answer: true

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