Destructuring an array from a function in JavaScript

The array for destructuring does not have to be stored in a variable. It can also be the result of a function. Let's look at an example. Let the following function be given:

javascriptfunction func() {
  return [2025, 12, 31];
}

Destructuring the value returned by this function:

javascriptlet [year, month, day] = func();
Задание 1

In the following code, parts of the array are written to the corresponding variables:

javascriptfunction func() {
  return ['John', 'Smit', 'development', 'programmer', 2000];
}

let arr = func();

let name       = arr[0];
let surname    = arr[1];
let department = arr[2];
let position   = arr[3];
let salary     = arr[4];

Rework this code through destructuring according to the learned theory.