JavaScript의 객체 구조 분해

객체의 구조 분해도 할 수 있습니다. 예를 들어, 다음과 같은 객체가 있다고 가정해 보겠습니다:

javascriptlet obj = {
  year:  2025,
  month: 12,
  day:   31,
};

이제 이 객체를 구조 분해해 보겠습니다:

javascriptlet obj = {
  year:  2025,
  month: 12,
  day:   31,
};

let {year, month, day} = obj;

console.log(year);  // 2025 출력
console.log(month); // 12 출력
console.log(day);   // 31 출력

객체를 구조 분해할 때 변수 이름은 객체의 키와 일치해야 합니다. 변수 순서와 객체 내 요소의 순서는 중요하지 않습니다.

Задание 1

다음 코드에서는 객체의 일부가 해당 변수에 기록됩니다:

javascriptlet options = {
  color: 'red',
  width:  400,
  height: 500,
};

let color  = options.color;
let width  = options.width;
let height = options.height;

학습한 이론에 따라 구조 분해를 사용하여 이 코드를 수정하세요.