Factorialize a Number - Portuguese (#34580)
* Factorialize a Number - Portuguese Solution added to .md * Add invocation to solution
This commit is contained in:
committed by
Randell Dawson
parent
46df633b74
commit
907b93eaea
@ -58,6 +58,10 @@ factorialize(5);
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
function factorialize(num) {
|
||||
return num <= 1 ? 1 : num * factorialize(num - 1);
|
||||
}
|
||||
|
||||
factorialize(5);
|
||||
```
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user