Revert "Challenge - ES6: Use Destructuring Assignment to Assign Variables from Arrays - Added solution (#26531)" (#34949)
This reverts commit 23096f7ed6
.
This commit is contained in:
committed by
Randell Dawson
parent
a18d7981e6
commit
fabd45e1b4
@ -42,11 +42,13 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"use strict";
|
|
||||||
let a = 8, b = 6;
|
let a = 8, b = 6;
|
||||||
// change code below this line
|
(() => {
|
||||||
|
"use strict";
|
||||||
|
// change code below this line
|
||||||
|
|
||||||
// change code above this line
|
// change code above this line
|
||||||
|
})();
|
||||||
console.log(a); // should be 6
|
console.log(a); // should be 6
|
||||||
console.log(b); // should be 8
|
console.log(b); // should be 8
|
||||||
```
|
```
|
||||||
@ -61,12 +63,6 @@ console.log(b); // should be 8
|
|||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"use strict";
|
// solution required
|
||||||
let a = 8, b = 6;
|
|
||||||
// change code below this line
|
|
||||||
[a, b] = [b, a];
|
|
||||||
// change code above this line
|
|
||||||
console.log(a); // should be 6
|
|
||||||
console.log(b); // should be 8
|
|
||||||
```
|
```
|
||||||
</section>
|
</section>
|
||||||
|
Reference in New Issue
Block a user