Skip to content

Commit

Permalink
[es] add missing trailing comma in `Web/JavaScript/Reference/Operator…
Browse files Browse the repository at this point in the history
…s/Destructuring_assignment` example code (#20671)

Add missing trailing comma in example code
  • Loading branch information
eiriarte committed May 20, 2024
1 parent a756fd9 commit 2fa9818
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ console.log(b); // [2, 3]

Ten en cuenta que se lanzará un {{jsxref("SyntaxError")}} si se usa una coma final en el lado derecho con un elemento `rest` o:

```js example-bad
const [a, ...b] = [1, 2, 3];
```js-nolint example-bad
const [a, ...b,] = [1, 2, 3];
// SyntaxError: el elemento rest no puede tener una coma al final
// Siempre considera usar el operador rest como último elemento
Expand Down

0 comments on commit 2fa9818

Please sign in to comment.