mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 11:08:54 +08:00
Update CONTRIBUTING.md
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -64,12 +64,12 @@ We want your work to be readable by others; therefore, we encourage you to note
|
|||||||
- Always use 2 spaces for indentation of code blocks
|
- Always use 2 spaces for indentation of code blocks
|
||||||
```
|
```
|
||||||
function sumOfArray (arrayOfNumbers) {
|
function sumOfArray (arrayOfNumbers) {
|
||||||
let sum = 0
|
let sum = 0
|
||||||
for (let i = 0; i < arrayOfNumbers.length; i++) {
|
for (let i = 0; i < arrayOfNumbers.length; i++) {
|
||||||
sum += arrayOfNumbers[i]
|
sum += arrayOfNumbers[i]
|
||||||
}
|
}
|
||||||
return (sum)
|
return (sum)
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
- Avoid using global variables and avoid '=='
|
- Avoid using global variables and avoid '=='
|
||||||
|
Reference in New Issue
Block a user