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