❗️Object.assign copies with getter/setter
Last updated
Was this helpful?
Last updated
Was this helpful?
⭐ copies with "" operations, so if:
source object has a getter method, or
target object has a setter method
⭐ they will be invoked❗ during the assignment, not copied❗.
如果沒正確理解這個「複製過程」,可能會產生下列問題:
(我問的)