From 3f2b4674a13ad8b009602c69afdcbb45a9f41deb Mon Sep 17 00:00:00 2001 From: Muhammad Awais Date: Tue, 5 May 2020 15:06:44 +0500 Subject: [PATCH 1/2] Fixed typo in CONTRIBUTING.md file --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40fdc72524..bad8ae1c08 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ We are very happy that you consider implementing algorithms and data structure f - You did your work - plagiarism is not allowed. - Any plagiarized work will not be merged. - Your work will be distributed under [GNU License](LICENSE) once your pull request is merged -- You submitted work fulfils or mostly fulfils our styles and standards +- Your submitted work fulfils or mostly fulfils our styles and standards **New implementation** is welcome! For example, new solutions to a problem, different representations of a graph data structure or algorithm designs with different complexity. From 6725ac0455129ca77ad03a0d5e38c917a1f0b602 Mon Sep 17 00:00:00 2001 From: vinayak Date: Tue, 5 May 2020 16:29:14 +0530 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- CONTRIBUTING.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bad8ae1c08..a89c76adf4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,12 +8,12 @@ Welcome to [TheAlgorithms/Javascript](https://github.com/TheAlgorithms/Javascrip ### Contributor -We are very happy that you consider implementing algorithms and data structure for others! This repository is referenced and used by learners from around the globe. Being one of our contributors, you agree and confirm that: +We are very happy that you consider implementing algorithms and data structures for others! This repository is referenced and used by learners from around the globe. Being one of our contributors, you agree and confirm that: - You did your work - plagiarism is not allowed. - Any plagiarized work will not be merged. - Your work will be distributed under [GNU License](LICENSE) once your pull request is merged -- Your submitted work fulfils or mostly fulfils our styles and standards +- Your submitted work must fulfill our styles and standards **New implementation** is welcome! For example, new solutions to a problem, different representations of a graph data structure or algorithm designs with different complexity. @@ -21,10 +21,10 @@ We are very happy that you consider implementing algorithms and data structure f ### Contribution -We appreciate any contribution, from fixing grammar mistakes to implementing complex algorithms. Please read this section if you are contributing your work. +We appreciate any contribution, from fixing grammar mistakes to implementing complex algorithms. Please read this section if you are contributing to your work. -If you submit a pull request that resolves an open issue, please help us to keep our issue list small by adding `fixes: #{$ISSUE_NO}` to your commit message. GitHub will use this tag to auto close the issue if your PR is merged. +If you submit a pull request that resolves an open issue, please help us to keep our issue list small by adding `fixes: #{$ISSUE_NO}` to your commit message. GitHub will use this tag to auto-close the issue if your PR is merged. #### What is an Algorithm? @@ -61,17 +61,18 @@ To maximize the readability and correctness of our code, we require that new sub - follow code indentation - 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) - } - - ``` + function sumOfArray (arrayOfNumbers) { + let sum = 0 + for (let i = 0; i < arrayOfNumbers.length; i++) { + sum += arrayOfNumbers[i] + } + return (sum) + } + + ``` - Avoid using global variables and avoid '==' - Please use 'let' over 'var' +- Please use 'console.log()' - We strongly recommend the use of ECMAScript 6 - Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms.