mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +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
|
||||
```
|
||||
function sumOfArray (arrayOfNumbers) {
|
||||
let sum = 0
|
||||
for (let i = 0; i < arrayOfNumbers.length; i++) {
|
||||
sum += arrayOfNumbers[i]
|
||||
}
|
||||
return (sum)
|
||||
}
|
||||
let sum = 0
|
||||
for (let i = 0; i < arrayOfNumbers.length; i++) {
|
||||
sum += arrayOfNumbers[i]
|
||||
}
|
||||
return (sum)
|
||||
}
|
||||
|
||||
```
|
||||
- Avoid using global variables and avoid '=='
|
||||
|
Reference in New Issue
Block a user