Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 71

A source object has a nested details object. After an object-spread copy is made, which statement describes copy.details?

  1. It is omitted because spread copies only primitive values
  2. It is a recursively cloned object with no shared references
  3. It refers to the same nested object as source.detailsپاسخ درست
  4. It becomes inherited from the source object

توضیح

Object spread copies enumerable own properties only one level deep, so the nested details value remains the same object reference. Calling this a recursive deep copy is the tempting mistake; later sources can also replace an earlier same-named property during spreading.

ادامهٔ این آزمون

شروع تمرین
سؤال 71: A source object has a nested details object. After an… · JavaScript Fundamentals · Questena