Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web/JavaScript/Reference/Global_Objects/Object/assign を更新 #23981

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Object.assign()
slug: Web/JavaScript/Reference/Global_Objects/Object/assign
l10n:
sourceCommit: 88d71e500938fa8ca969fe4fe3c80a5abe23d767
sourceCommit: 8b6cec0ceff01e7a9d6865cf5306788e15cce4b8
---

{{JSRef}}
Expand Down Expand Up @@ -57,7 +57,7 @@ console.log(copy); // { a: 1 }

### ディープクローンについての注意

[ディープクローン](/ja/docs/Glossary/Deep_copy)を行う場合、別に [`structuredClone()`](/ja/docs/Web/API/structuredClone) のような代替手段を使用する必要があります。 `Object.assign()` はプロパティ値のみをコピーするからです。
[ディープクローン](/ja/docs/Glossary/Deep_copy)を行う場合、別に {{DOMxRef("Window.structuredClone", "structuredClone()")}} のような代替手段を使用する必要があります。 `Object.assign()` はプロパティ値のみをコピーするからです。

元の値がオブジェクトへの参照である場合、参照の値のみがコピーされます。

Expand Down