前ページではオブジェクトの浅いコピーについて語りました。 そこでは以前出てきたスプレッド構文 (...) のおかげで簡単に浅いコピーができることがわかりました。 今回はふたつ以上のオブジェクトをマージすることを考えます。なお、前ページのオブジェクトの浅いコピーで得た知識を活用するため、まだお読みでない方については改めてお読みいただき、その後こちらをご覧ください。 📄️ オブジェクトを浅くコピーするオブジェクトとは色々なキーとプロパティの組み合わせをひとつのモノとして扱うことができます。 今回行うマージについてマージという言葉をよく聞くのは Git などに代表される VCS (Version Control System) でしょう。一般的にマージはする側とされる側が存在し、する側にされる側のすべて (時に選択できる) が移動ないしコピーされることを指すことが多いでしょう。 JavaSc