4 Commits

Author SHA1 Message Date
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
9212e6d684 Remove live code & console.log, leave examples as comments (Geometry, Graphs, Maths). 2021-10-10 17:55:08 +02:00
4e680d7087 Update WhileLoopFactorial.js 2020-10-31 12:34:54 +05:30
b400290186 Added while loop factorial 2020-10-20 23:07:14 +05:30