Use the destructuring, instead of a temporary variable, to swap the values of the variables.
Suggestion: look at the official documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
Use the destructuring, instead of a temporary variable, to swap the values of the variables.
Suggestion: look at the official documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment