1 changed files with 8 additions and 1 deletions
  1. 8 1
      js/05/js/script.js

+ 8 - 1
js/05/js/script.js

@@ -223,5 +223,12 @@
 //========================================================================================//
 
 let arr = [1,2,3,4, 5,6,7,10];
+let { length: length, [0]: a, [1]: b, } = arr;
 
-let [a,b,] = arr;
+
+console.log('length = ' + length);
+console.log('a = ' + a);
+console.log('b = ' + b);
+
+
+//========================================================================================//