Are you ready for another code challenge? Join me in this video as you test your coding knowledge with the simple quiz questions.
Don't forget to make your guess in the comments below.
-------------------------------------------------------------------------------------------
🔔Like and subscribe for more videos. 🔔
Connect me on linkedin :
https://www.linkedin.com/in/meenakshilodhi...
https://www.linkedin.com/in/rk-barnwal23/
------------------------------------------------------------------------------------------
Answer OPTION:- A) [1, 2, 3, 4]
Explanation: The variable a is assigned an array [1, 2, 3]. The variable b is assigned a reference to the same array using the assignment b = a. Therefore, a and b both refer to the same array object.
When b.push(4) is called, it modifies the same array object that a references, adding the value 4 to the end of the array. Therefore, when console.log(a)