chore(i18n,learn): processed translations (#45123)

This commit is contained in:
camperbot
2022-02-16 22:48:09 +05:30
committed by GitHub
parent 51c8b065f5
commit c934590548
48 changed files with 515 additions and 492 deletions

View File

@ -1,6 +1,6 @@
---
id: 597b2b2a2702b44414742771
title: Factorial
title: Fattoriale
challengeType: 5
forumTopicId: 302263
dashedName: factorial
@ -8,49 +8,49 @@ dashedName: factorial
# --description--
Write a function to return the factorial of a number.
Scrivi una funzione che restituisce il fattoriale di un numero.
Factorial of a number is given by:
Il fattoriale di un numero è dato da:
<pre><big>n! = n * (n-1) * (n-2) * ..... * 1</big>
</pre>
For example:
Ad esempio:
<ul>
<li><code>3! = 3 * 2 * 1 = 6</code></li>
<li><code>4! = 4 * 3 * 2 * 1 = 24</code></li>
</ul>
**Note:** `0! = 1`
**Nota:** `0! = 1`
# --hints--
`factorial` should be a function.
`factorial` dovrebbe essere una funzione.
```js
assert(typeof factorial === 'function');
```
`factorial(2)` should return a number.
`factorial(2)` dovrebbe restituire un numero.
```js
assert(typeof factorial(2) === 'number');
```
`factorial(3)` should return 6.
`factorial(3)` dovrebbe restituire 6.
```js
assert.equal(factorial(3), 6);
```
`factorial(5)` should return 120.
`factorial(5)` dovrebbe restituire 120.
```js
assert.equal(factorial(5), 120);
```
`factorial(10)` should return 3,628,800.
`factorial(10)` dovrebbe restituire 3,628,800.
```js
assert.equal(factorial(10), 3628800);