We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1fa7c9 commit 4d4d004Copy full SHA for 4d4d004
Swap-Items.js
@@ -0,0 +1,11 @@
1
+
2
+// Swap Items
3
4
+let a = 1;
5
+let b = 2;
6
+console.log(a); // output: 1
7
+console.log(b); // output: 2
8
9
+[a, b] = [b, a];
10
+console.log(a); // output: 2
11
+console.log(b); // output: 1
0 commit comments