From 1ba1f5f44bea47437f9840f80cca4105d4bd631e Mon Sep 17 00:00:00 2001 From: mhrooz Date: Mon, 24 Jun 2024 17:15:44 +0200 Subject: [PATCH] 5.9 --- 5.9Destructuring/t.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/5.9Destructuring/t.js b/5.9Destructuring/t.js index 7ffa0bd..9302ff7 100644 --- a/5.9Destructuring/t.js +++ b/5.9Destructuring/t.js @@ -1,5 +1,11 @@ -let arr = ["John", "Smith"] +console.log("===================4.9 Destructuring value=====================") +console.log("an Example") +let arr = ["John", "Smith"] let [firstName, surname] = arr; console.log(firstName); -console.log(surname); \ No newline at end of file +console.log(surname); + +console.log("can be used in any iterable variables, like set, string") +let [a,b,c] = "abc"; +let [one, two, three] = new Set([1, 2, 3]); \ No newline at end of file