diff --git a/snippets/ary.md b/snippets/ary.md index 3b41985bb..2b03fc06a 100644 --- a/snippets/ary.md +++ b/snippets/ary.md @@ -7,7 +7,7 @@ lastUpdated: 2020-10-18T20:24:28+03:00 Creates a function that accepts up to `n` arguments, ignoring any additional arguments. -- Call the provided function, `fn`, with up to `n` arguments, using `Array.prototype.slice(0, n)` and the spread operator (`...`). +- Call the provided function, `fn`, with up to `n` arguments, using `Array.prototype.slice()` and the spread operator (`...`). ```js const ary = (fn, n) => (...args) => fn(...args.slice(0, n)); diff --git a/snippets/initial.md b/snippets/initial.md index 425d46951..3c3063ca4 100644 --- a/snippets/initial.md +++ b/snippets/initial.md @@ -7,7 +7,7 @@ lastUpdated: 2020-11-03T21:46:13+02:00 Returns all the elements of an array except the last one. -- Use `Array.prototype.slice(0, -1)` to return all but the last element of the array. +- Use `Array.prototype.slice()` to return all but the last element of the array. ```js const initial = arr => arr.slice(0, -1); diff --git a/snippets/tail.md b/snippets/tail.md index 18692038b..5d7d15ef8 100644 --- a/snippets/tail.md +++ b/snippets/tail.md @@ -7,7 +7,8 @@ lastUpdated: 2020-10-22T20:24:30+03:00 Returns all elements in an array except for the first one. -- Return `Array.prototype.slice(1)` if `Array.prototype.length` is more than `1`, otherwise, return the whole array. +- Use `Array.prototype.slice()`to return the array without the first element if `Array.prototype.length` is more than `1`. +- Otherwise, return the whole array. ```js const tail = arr => (arr.length > 1 ? arr.slice(1) : arr); diff --git a/snippets/uncurry.md b/snippets/uncurry.md index c61660bdc..c059f60ea 100644 --- a/snippets/uncurry.md +++ b/snippets/uncurry.md @@ -10,7 +10,7 @@ Uncurries a function up to depth `n`. - Return a variadic function. - Use `Array.prototype.reduce()` on the provided arguments to call each subsequent curry level of the function. - If the `length` of the provided arguments is less than `n` throw an error. -- Otherwise, call `fn` with the proper amount of arguments, using `Array.prototype.slice(0, n)`. +- Otherwise, call `fn` with the proper amount of arguments, using `Array.prototype.slice()`. - Omit the second argument, `n`, to uncurry up to depth `1`. ```js