diff --git a/snippets/attempt.md b/snippets/attempt.md index 62d495bf3..bc8d98e48 100644 --- a/snippets/attempt.md +++ b/snippets/attempt.md @@ -7,8 +7,8 @@ lastUpdated: 2020-10-18T20:24:28+03:00 Attempts to invoke a function with the provided arguments, returning either the result or the caught error object. -- Use a `try... catch` block to return either the result of the function or an appropriate error. -- If the caught object is not an `Error`, use it to create a new `Error`. +- Use a `try...catch` block to return either the result of the function or an appropriate error. +- If the caught object is not an `Error`, use it to create a new `Error`. ```js const attempt = (fn, ...args) => { diff --git a/snippets/bucketSort.md b/snippets/bucketSort.md index e51ee1ea5..665909c27 100644 --- a/snippets/bucketSort.md +++ b/snippets/bucketSort.md @@ -7,7 +7,7 @@ lastUpdated: 2020-12-29T12:22:44+02:00 Sorts an array of numbers, using the bucket sort algorithm. -- Use `Math.min(),` `Math.max()` and the spread operator (`...`) to find the minimum and maximum values of the given array. +- Use `Math.min()`, `Math.max()` and the spread operator (`...`) to find the minimum and maximum values of the given array. - Use `Array.from()` and `Math.floor()` to create the appropriate number of `buckets` (empty arrays). - Use `Array.prototype.forEach()` to populate each bucket with the appropriate elements from the array. - Use `Array.prototype.reduce()`, the spread operator (`...`) and `Array.prototype.sort()` to sort each bucket and append it to the result. diff --git a/snippets/copyToClipboard.md b/snippets/copyToClipboard.md index 5d427206e..c15de9884 100644 --- a/snippets/copyToClipboard.md +++ b/snippets/copyToClipboard.md @@ -12,7 +12,7 @@ Only works as a result of user action (i.e. inside a `click` event listener). - Use `Selection.getRangeAt()`to store the selected range (if any). - Use `Document.execCommand('copy')` to copy to the clipboard. - Remove the `