Question: 7. Given the code below. Write the outputs for each line of code. const arr [1, 2, 3, 4]; // write the output of
7. Given the code below. Write the outputs for each line of code. const arr [1, 2, 3, 4]; // write the output of the line below arr.push([5, 6, 7]); // Write the output of the line below. // (suppose that the code above didn't change the array) arr.push(5, 6, 7); // Write the output of the line below (both lines above are executed) console.log(arr);
Step by Step Solution
There are 3 Steps involved in it
Theres a syntax error in the declaration of the array It should be const arr 1 2 3 4 Now lets ana... View full answer
Get step-by-step solutions from verified subject matter experts
