Browse Source

improve example in swapy

content-update
Clement Denis 3 years ago
parent
commit
2bf1a2990b
  1. 11
      subjects/swapy/README.md

11
subjects/swapy/README.md

@ -42,12 +42,21 @@ Now my array look like this:
- You must replace the third element of the provided `replaceMe` array by the
string `'great'`
Example:
```js
let replaceMe = ['pif','paf','pom']
// expect -> ['pif','paf','great']
```
- You must swap the first and second element of the provided `swapMe` array.
Example:
```js
['pif','paf','pom'] -> ['paf','pif','pom'] // last element is untouched
let swapMe = ['pif','paf','pom']
// expect -> ['paf','pif','pom'] (last element is untouched)
```
> You must modify the `swapMe` array, not create a new one !

Loading…
Cancel
Save