From 1188b49868558f2a81021fb70954b80296081d2b Mon Sep 17 00:00:00 2001 From: tristantheb Date: Sun, 14 Mar 2021 10:46:21 +0100 Subject: FIX: Fix the semicolon by a correct comma line 232 - Issue #101 (#157) * FIX: Fix the semicolon by a correct comma line 232 * Update tags with missing Reference tag --- .../reference/operators/destructuring_assignment/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'files/fr/web/javascript/reference') diff --git a/files/fr/web/javascript/reference/operators/destructuring_assignment/index.html b/files/fr/web/javascript/reference/operators/destructuring_assignment/index.html index 3cde0fef57..45e0cd77af 100644 --- a/files/fr/web/javascript/reference/operators/destructuring_assignment/index.html +++ b/files/fr/web/javascript/reference/operators/destructuring_assignment/index.html @@ -2,8 +2,13 @@ title: Affecter par décomposition slug: Web/JavaScript/Reference/Operators/Destructuring_assignment tags: + - Destructuration + - Affectation de déstructuration - ECMAScript 2015 + - ES6 - JavaScript + - Caractéristiques de la langue + - Déstructuration des objets imbriqués et des tableaux - Opérateur - Reference translation_of: Web/JavaScript/Reference/Operators/Destructuring_assignment @@ -225,7 +230,7 @@ console.log(truc); // true

Une variable peut recevoir une valeur par défaut lors de la décomposition si la propriété correspondante de l'objet vaut undefined.

-
const {a = 10; b = 5} = {a: 3};
+
const {a = 10, b = 5} = {a: 3};
 
 console.log(a); // 3
 console.log(b); // 5
-- cgit v1.2.3-54-g00ecf