File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -48,18 +48,29 @@ Algorithms in this repo should not be how-to examples for existing Javascript pa
4848#### Coding Style
4949
5050We 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'
You can’t perform that action at this time.
0 commit comments