From 2bf1a2990bc61a177a6acbcf760146b545671fb0 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Fri, 30 Apr 2021 01:00:55 +0100 Subject: [PATCH] improve example in swapy --- subjects/swapy/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/subjects/swapy/README.md b/subjects/swapy/README.md index 2f05b049..0cbc9d19 100644 --- a/subjects/swapy/README.md +++ b/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 !