Преглед на файлове

fix example threejs-prerequisites.md

SeemsPyo преди 5 години
родител
ревизия
cdb5482850
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      threejs/lessons/threejs-prerequisites.md

+ 3 - 3
threejs/lessons/threejs-prerequisites.md

@@ -165,14 +165,14 @@ Destructuring works with arrays too. Assume an array `const position = [1, 2, 3,
 old code
 
 ```js
-const x = position[2];
-const y = position[1];
+const x = position[2]; // 3
+const y = position[1]; // 2
 ```
 
 new code
 
 ```js
-const [x, y] = position;
+const [, y, x] = position; // x = 3, y = 2
 ```
 
 Destructuring also works in function arguments

粤ICP备19079148号