diff --git a/snippets/addWeekDays.md b/snippets/addWeekDays.md index b1f841f8b..8ce8da656 100644 --- a/snippets/addWeekDays.md +++ b/snippets/addWeekDays.md @@ -3,7 +3,7 @@ title: addWeekDays tags: date,intermediate --- -Calculates the date after adding the ginen number of business days. +Calculates the date after adding the given number of business days. - Use `Array.from()` to construct an array with `length` equal to the `count` of business days to be added. - Use `Array.prototype.reduce()` to iterate over the array, starting from `startDate` and incrementing, using `Date.prototype.getDate()` and `Date.prototype.setDate()`. diff --git a/snippets/allUnique.md b/snippets/allUnique.md index bde0d3dc9..886bc8a30 100644 --- a/snippets/allUnique.md +++ b/snippets/allUnique.md @@ -5,7 +5,7 @@ tags: array,beginner Checks if all elements in an array are unique. -- Create a new `Set` from the mapped values to keep only unique occurences. +- Create a new `Set` from the mapped values to keep only unique occurrences. - Use `Array.prototype.length` and `Set.prototype.size` to compare the length of the unique values to the original array. ```js diff --git a/snippets/allUniqueBy.md b/snippets/allUniqueBy.md index b42fe8630..8ee515855 100644 --- a/snippets/allUniqueBy.md +++ b/snippets/allUniqueBy.md @@ -6,7 +6,7 @@ tags: array,intermediate Checks if all elements in an array are unique, based on the provided mapping function. - Use `Array.prototype.map()` to apply `fn` to all elements in `arr`. -- Create a new `Set` from the mapped values to keep only unique occurences. +- Create a new `Set` from the mapped values to keep only unique occurrences. - Use `Array.prototype.length` and `Set.prototype.size` to compare the length of the unique mapped values to the original array. ```js diff --git a/snippets/converge.md b/snippets/converge.md index e727c8360..804503238 100644 --- a/snippets/converge.md +++ b/snippets/converge.md @@ -6,7 +6,7 @@ tags: function,intermediate Accepts a converging function and a list of branching functions and returns a function that applies each branching function to the arguments and the results of the branching functions are passed as arguments to the converging function. - Use `Array.prototype.map()` and `Function.prototype.apply()` to apply each function to the given arguments. -- Use the spread operator (`...`) to call `coverger` with the results of all other functions. +- Use the spread operator (`...`) to call `converger` with the results of all other functions. ```js const converge = (converger, fns) => (...args) => diff --git a/snippets/countSubstrings.md b/snippets/countSubstrings.md index cefd26190..ab95bd8e4 100644 --- a/snippets/countSubstrings.md +++ b/snippets/countSubstrings.md @@ -3,7 +3,7 @@ title: countSubstrings tags: string,algorithm,beginner --- -Counts the occurences of a substring in a given string. +Counts the occurrences of a substring in a given string. - Use `Array.prototype.indexOf()` to look for `searchValue` in `str`. - Increment a counter if the value is found and update the index, `i`. diff --git a/snippets/isObject.md b/snippets/isObject.md index 93ffc19a1..fc9c35201 100644 --- a/snippets/isObject.md +++ b/snippets/isObject.md @@ -7,7 +7,7 @@ Checks if the passed value is an object or not. - Uses the `Object` constructor to create an object wrapper for the given value. - If the value is `null` or `undefined`, create and return an empty object. -- Οtherwise, return an object of a type that corresponds to the given value. +- Otherwise, return an object of a type that corresponds to the given value. ```js const isObject = obj => obj === Object(obj); diff --git a/snippets/randomHexColorCode.md b/snippets/randomHexColorCode.md index d7a70f7f2..139b57912 100644 --- a/snippets/randomHexColorCode.md +++ b/snippets/randomHexColorCode.md @@ -5,7 +5,7 @@ tags: math,random,beginner Generates a random hexadecimal color code. -- Use `Math.rando()m` to generate a random 24-bit (6 * 4bits) hexadecimal number. +- Use `Math.random()` to generate a random 24-bit (6 * 4bits) hexadecimal number. - Use bit shifting and then convert it to an hexadecimal string using `Number.prototype.toString(16)`. ```js diff --git a/snippets/vectorAngle.md b/snippets/vectorAngle.md index 2e72b4eee..727b597ae 100644 --- a/snippets/vectorAngle.md +++ b/snippets/vectorAngle.md @@ -6,7 +6,7 @@ tags: math,beginner Calculates the angle (theta) between two vectors. - Use `Array.prototype.reduce()`, `Math.pow()` and `Math.sqrt()` to calculate the magnitude of each vector and the scalar product of the two vectors. -- Use `Math.acos()` to calculate the arccos and get the theta value. +- Use `Math.acos()` to calculate the arccosine and get the theta value. ```js const vectorAngle = (x, y) => {