diff --git a/README.md b/README.md index 8b9c31e13..f370a585a 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ * [Random integer in range](#random-integer-in-range) * [Random number in range](#random-number-in-range) * [Randomize order of array](#randomize-order-of-array) -* [Redirect to URL](#redirect-to-url) +* [Redirect to url](#redirect-to-url) * [Reverse a string](#reverse-a-string) * [RGB to hexadecimal](#rgb-to-hexadecimal) * [Run promises in series](#run-promises-in-series) @@ -405,7 +405,7 @@ const head = arr => arr[0]; ### Initial of list -Return `arr.slice(0,-1)`. +Use `arr.slice(0,-1)`to return all but the last element of the array. ```js const initial = arr => arr.slice(0, -1); diff --git a/snippets/initial-of-list.md b/snippets/initial-of-list.md index a222f2306..1f967f804 100644 --- a/snippets/initial-of-list.md +++ b/snippets/initial-of-list.md @@ -1,6 +1,6 @@ ### Initial of list -Return `arr.slice(0,-1)`. +Use `arr.slice(0,-1)`to return all but the last element of the array. ```js const initial = arr => arr.slice(0, -1);