diff --git a/snippets/arithmeticProgression.md b/snippets/arithmeticProgression.md index 8d84499e1..88f781da4 100644 --- a/snippets/arithmeticProgression.md +++ b/snippets/arithmeticProgression.md @@ -7,7 +7,7 @@ lastUpdated: 2021-10-13T19:29:39+02:00 Creates an array of numbers in the arithmetic progression, starting with the given positive integer and up to the specified limit. -- Use `Array.from()` to create an array of the desired length, `lim/n`. Use a map function to fill it with the desired values in the given range. +- Use `Array.from()` to create an array of the desired length, `lim / n`. Use a map function to fill it with the desired values in the given range. ```js const arithmeticProgression = (n, lim) => diff --git a/snippets/fahrenheitToCelsius.md b/snippets/fahrenheitToCelsius.md index 22986f310..472164a55 100644 --- a/snippets/fahrenheitToCelsius.md +++ b/snippets/fahrenheitToCelsius.md @@ -8,7 +8,7 @@ lastUpdated: 2021-01-04T13:04:15+02:00 Converts Fahrenheit to Celsius. -- Follow the conversion formula `C = (F - 32) * 5/9`. +- Follow the conversion formula `C = (F - 32) * 5 / 9`. ```js const fahrenheitToCelsius = degrees => (degrees - 32) * 5 / 9; diff --git a/snippets/gcd.md b/snippets/gcd.md index ed5ba000c..457557897 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -9,7 +9,7 @@ Calculates the greatest common divisor between two or more numbers/arrays. - The inner `_gcd` function uses recursion. - Base case is when `y` equals `0`. In this case, return `x`. -- Otherwise, return the GCD of `y` and the remainder of the division `x/y`. +- Otherwise, return the GCD of `y` and the remainder of the division `x / y`. ```js const gcd = (...arr) => { diff --git a/snippets/initializeArrayWithRange.md b/snippets/initializeArrayWithRange.md index bd38da718..eef2febf9 100644 --- a/snippets/initializeArrayWithRange.md +++ b/snippets/initializeArrayWithRange.md @@ -8,7 +8,7 @@ lastUpdated: 2020-10-22T20:23:47+03:00 Initializes an array containing the numbers in the specified range where `start` and `end` are inclusive with their common difference `step`. - Use `Array.from()` to create an array of the desired length. -- Use `(end - start + 1)/step` and a map function to fill the array with the desired values in the given range. +- Use `(end - start + 1) / step` and a map function to fill the array with the desired values in the given range. - Omit the second argument, `start`, to use a default value of `0`. - Omit the last argument, `step`, to use a default value of `1`. diff --git a/snippets/initializeArrayWithRangeRight.md b/snippets/initializeArrayWithRangeRight.md index f29dd5cbd..df08bf21d 100644 --- a/snippets/initializeArrayWithRangeRight.md +++ b/snippets/initializeArrayWithRangeRight.md @@ -7,7 +7,7 @@ lastUpdated: 2020-10-20T23:02:01+03:00 Initializes an array containing the numbers in the specified range (in reverse) where `start` and `end` are inclusive with their common difference `step`. -- Use `Array.from()` to create an array of the desired length, `(end - start + 1)/step`. +- Use `Array.from()` to create an array of the desired length, `(end - start + 1) / step`. - Use `Array.prototype.map()` to fill the array with the desired values in the given range. - Omit the second argument, `start`, to use a default value of `0`. - Omit the last argument, `step`, to use a default value of `1`. diff --git a/snippets/isValidJSON.md b/snippets/isValidJSON.md index 6aa964bcb..2bb3d1882 100644 --- a/snippets/isValidJSON.md +++ b/snippets/isValidJSON.md @@ -7,7 +7,7 @@ lastUpdated: 2020-10-18T13:49:49+03:00 Checks if the provided string is a valid JSON. -- Use `JSON.parse()` and a `try... catch` block to check if the provided string is a valid JSON. +- Use `JSON.parse()` and a `try...catch` block to check if the provided string is a valid JSON. ```js const isValidJSON = str => { diff --git a/snippets/nthRoot.md b/snippets/nthRoot.md index 09ad2e9df..0411c9256 100644 --- a/snippets/nthRoot.md +++ b/snippets/nthRoot.md @@ -7,7 +7,7 @@ lastUpdated: 2021-01-06T22:47:48+02:00 Calculates the nth root of a given number. -- Use `Math.pow()` to calculate `x` to the power of `1/n` which is equal to the nth root of `x`. +- Use `Math.pow()` to calculate `x` to the power of `1 / n` which is equal to the nth root of `x`. ```js const nthRoot = (x, n) => Math.pow(x, 1 / n);