diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 618a99b1a..40e6f2a17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,7 +64,7 @@ Here's what you can do to help: - If your snippet's code is short enough (around 80 characters), you can make it a single-line function (although not mandatory). Otherwise, use multiple lines. - Prefer using `Array` methods whenever possible. - Prefer `Array.concat()` instead of `Array.push()` when working with `Array.reduce()`. -- Use strict equality checking (`===` and `!==` instead of `==` and `!=`), unless you specificly have reason not to. +- Use strict equality checking (`===` and `!==` instead of `==` and `!=`), unless you specifically have reason not to. - Prefer using the ternary operator (`condition ? trueResult : falseResult`) instead of `if else` statements whenever possible. - Avoid nesting ternary operators (but you can do it if you feel like you should). - You should define multiple variables on the same line (e.g. `const x = 0, y = 0`) on the same line whenever possible. diff --git a/snippets/deep-flatten-array.md b/snippets/deep-flatten-array.md index d33ff7e25..8e9497d33 100644 --- a/snippets/deep-flatten-array.md +++ b/snippets/deep-flatten-array.md @@ -2,7 +2,7 @@ Use recursion. Use `Array.concat()` with an empty array (`[]`) and the spread operator (`...`) to flatten an array. -Rrecursively flatten each element that is an array. +Recursively flatten each element that is an array. ```js const deepFlatten = arr => [].concat(...arr.map(v => Array.isArray(v) ? deepFlatten(v) : v)); diff --git a/snippets/shallow-clone-object.md b/snippets/shallow-clone-object.md index f3536999f..456f38462 100644 --- a/snippets/shallow-clone-object.md +++ b/snippets/shallow-clone-object.md @@ -1,6 +1,6 @@ ### Shallow clone object -Use `Object.assign()` and an empty object (`{}`) to create a shallo clone of the original. +Use `Object.assign()` and an empty object (`{}`) to create a shallow clone of the original. ```js const shallowClone = obj => Object.assign({}, obj); diff --git a/snippets/validate-email.md b/snippets/validate-email.md index d83a41904..e168ac22b 100644 --- a/snippets/validate-email.md +++ b/snippets/validate-email.md @@ -1,6 +1,6 @@ ### Validate email -Use a regular experssion to check if the email is valid. +Use a regular expression to check if the email is valid. Returns `true` if email is valid, `false` if not. ```js