Solution Review: Shallow Copy
In this lesson, we will discuss the solutions to the questions in the previous lesson.
We'll cover the following...
We'll cover the following...
For the code above, you had to answer the following question:
Explanation #
Run the code below to see the output:
As you can see, Option C is the correct answer. Let’s discuss why.
There is an object, girl, that has properties name and info. On line 6, we copy the properties of the girl object into the newGirl object using ...