Browse Source

improve example in swapy

pull/779/head
Clement Denis 4 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 - You must replace the third element of the provided `replaceMe` array by the
string `'great'` 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. - You must swap the first and second element of the provided `swapMe` array.
Example: Example:
```js ```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 ! > You must modify the `swapMe` array, not create a new one !

Loading…
Cancel
Save