MCQs > IT & Programming > JavaScript > What is newRay equal to at the end of the following code? var ray = []; ray['0'] = 1; ray['x'] = 2; var newRay = [] for( var i in ray ) { newRay.push( ray[ i ] ); }

JavaScript MCQs

What is newRay equal to at the end of the following code? var ray = []; ray["0"] = 1; ray["x"] = 2; var newRay = [] for( var i in ray ) { newRay.push( ray[ i ] ); }

Answer

Correct Answer: [ 1, 2 ]

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