Skip to content

Commit 90e13c0

Browse files
authored
Update CONTRIBUTING.md
1 parent ea169a2 commit 90e13c0

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,29 @@ Algorithms in this repo should not be how-to examples for existing Javascript pa
4848
#### Coding Style
4949

5050
We want your work to be readable by others; therefore, we encourage you to note the following:
51+
- Must follow [JavaScript Standard Style](https://standardjs.com/)
52+
- Command to install JavaScript Standard Style
53+
```
54+
$ npm install standard --save-dev
55+
```
56+
- Usage
57+
```
58+
$ standard
59+
```
60+
5161
- Use camelCase for identifier names (variables and functions)
5262
- Names start with a letter
5363
- follow code indentation
5464
- Always use 2 spaces for indentation of code blocks
5565
```
56-
function sumOfArray(arrayOfNumbers) {
57-
let sum = 0;
66+
function sumOfArray (arrayOfNumbers) {
67+
let sum = 0
5868
for (let i = 0; i < arrayOfNumbers.length; i++) {
59-
sum += arrayOfNumbers[i];
69+
sum += arrayOfNumbers[i]
6070
}
61-
return (sum);
71+
return (sum)
6272
}
73+
6374
```
6475
- Avoid using global variables and avoid '=='
6576
- use 'let' over 'var'

0 commit comments

Comments
 (0)