merelymyself 9513bcd77a merge: WhileLoopFactorial: Optimize and add tests (#992)
* Optimised the factorial function.

There was previously an unnecessary check for if the number was 0 or 1.

* Create WhileLoopFactorial.test.js

The test was not present previously.

* result *= num

* Update WhileLoopFactorial.test.js

* testFactorial function

* Space for formatting.

* should fix the formatting issues. I was having trouble with npx standard, so I just used the online verifier at https://standardjs.com/demo.html
2022-04-21 21:58:29 +05:30
2021-10-28 15:37:43 +05:30
2022-03-27 12:07:54 +05:30
2022-03-29 22:03:26 +05:30
2021-10-28 13:52:22 +05:30
2021-10-28 15:37:43 +05:30
2021-11-23 11:34:26 +05:30
2021-10-28 15:37:43 +05:30
2022-02-16 14:24:32 +05:30
2021-10-03 21:29:55 +05:30
2020-12-20 23:20:29 +05:30
2020-10-12 01:17:49 +05:30
2017-07-13 11:42:34 +05:30

The Algorithms - JavaScript

contributions welcome Language grade: JavaScript Node CI update_directory_md Discord chat standard.js

All algorithms implemented in JavaScript (for educational purposes only)

Open in Gitpod

These are for demonstration purposes only. There are many implementations of sorts in the JavaScript standard library that are much better for performance reasons.

Contribution Guidelines

Read our Contribution Guidelines before you contribute.

List of Algorithms

See our directory.

Algorithm Explanation

See our wiki.

Languages
JavaScript 100%