diff --git a/snippets/URLJoin.md b/snippets/URLJoin.md index 18af73caf..d923db122 100644 --- a/snippets/URLJoin.md +++ b/snippets/URLJoin.md @@ -9,7 +9,7 @@ lastUpdated: 2020-10-22T20:24:44+03:00 Joins all given URL segments together, then normalizes the resulting URL. -- Use `String.prototype.join()` to combine URL segments. +- Use `Array.prototype.join()` to combine URL segments. - Use a series of `String.prototype.replace()` calls with various regular expressions to normalize the resulting URL (remove double slashes, add proper slashes for protocol, remove slashes before parameters, combine parameters with `'&'` and normalize first parameter delimiter). ```js diff --git a/snippets/formatDuration.md b/snippets/formatDuration.md index 5bb7e6aa7..4845467f5 100644 --- a/snippets/formatDuration.md +++ b/snippets/formatDuration.md @@ -12,7 +12,7 @@ Returns the human-readable format of the given number of milliseconds. - Divide `ms` with the appropriate values to obtain the appropriate values for `day`, `hour`, `minute`, `second` and `millisecond`. - Use `Object.entries()` with `Array.prototype.filter()` to keep only non-zero values. - Use `Array.prototype.map()` to create the string for each value, pluralizing appropriately. -- Use `String.prototype.join()` to combine the values into a string. +- Use `Array.prototype.join()` to combine the values into a string. ```js const formatDuration = ms => { diff --git a/snippets/formatSeconds.md b/snippets/formatSeconds.md index b18da0e53..cdf2a0c2a 100644 --- a/snippets/formatSeconds.md +++ b/snippets/formatSeconds.md @@ -12,7 +12,7 @@ Returns the ISO format of the given number of seconds. - Divide `s` with the appropriate values to obtain the appropriate values for `hour`, `minute` and `second`. - Store the `sign` in a variable to prepend it to the result. - Use `Array.prototype.map()` in combination with `Math.floor()` and `String.prototype.padStart()` to stringify and format each segment. -- Use `String.prototype.join()` to combine the values into a string. +- Use `Array.prototype.join()` to combine the values into a string. ```js const formatSeconds = s => { diff --git a/snippets/reverseNumber.md b/snippets/reverseNumber.md index d28853531..db79df053 100644 --- a/snippets/reverseNumber.md +++ b/snippets/reverseNumber.md @@ -10,7 +10,7 @@ lastUpdated: 2020-09-18T21:19:23+03:00 Reverses a number. - Use `Object.prototype.toString()` to convert `n` to a string. -- Use `String.prototype.split()`, `Array.prototype.reverse()` and `String.prototype.join()` to get the reversed value of `n` as a string. +- Use `String.prototype.split()`, `Array.prototype.reverse()` and `Array.prototype.join()` to get the reversed value of `n` as a string. - Use `parseFloat()` to convert the string to a number and `Math.sign()` to preserve its sign. ```js diff --git a/snippets/reverseString.md b/snippets/reverseString.md index 4718c7fa6..bc42d46c1 100644 --- a/snippets/reverseString.md +++ b/snippets/reverseString.md @@ -10,7 +10,7 @@ lastUpdated: 2020-10-18T14:58:09+03:00 Reverses a string. - Use the spread operator (`...`) and `Array.prototype.reverse()` to reverse the order of the characters in the string. -- Combine characters to get a string using `String.prototype.join()`. +- Combine characters to get a string using `Array.prototype.join()`. ```js const reverseString = str => [...str].reverse().join(''); diff --git a/snippets/sortCharactersInString.md b/snippets/sortCharactersInString.md index ad8d8b08d..403a3712c 100644 --- a/snippets/sortCharactersInString.md +++ b/snippets/sortCharactersInString.md @@ -10,7 +10,7 @@ lastUpdated: 2020-10-22T20:24:30+03:00 Alphabetically sorts the characters in a string. - Use the spread operator (`...`), `Array.prototype.sort()` and `String.prototype.localeCompare()` to sort the characters in `str`. -- Recombine using `String.prototype.join()`. +- Recombine using `Array.prototype.join()`. ```js const sortCharactersInString = str =>