--- id: 5900f3711000cf542c50fe84 challengeType: 5 title: 'Problem 5: Smallest multiple' videoUrl: '' localeTitle: 'Problema 5: el múltiplo más pequeño' --- ## Description
2520 es el número más pequeño que se puede dividir por cada uno de los números del 1 al 10 sin ningún resto. ¿Cuál es el número positivo más pequeño que es divisible por todos los números del 1 al n ?
## Instructions
## Tests
```yml tests: - text: smallestMult(5) debe devolver 60. testString: 'assert.strictEqual(smallestMult(5), 60, "smallestMult(5) should return 60.");' - text: smallestMult(7) debe devolver 420. testString: 'assert.strictEqual(smallestMult(7), 420, "smallestMult(7) should return 420.");' - text: smallestMult(10) debe devolver 2520. testString: 'assert.strictEqual(smallestMult(10), 2520, "smallestMult(10) should return 2520.");' - text: smallestMult(13) debe devolver 360360. testString: 'assert.strictEqual(smallestMult(13), 360360, "smallestMult(13) should return 360360.");' - text: smallestMult(20) debe devolver 232792560. testString: 'assert.strictEqual(smallestMult(20), 232792560, "smallestMult(20) should return 232792560.");' ```
## Challenge Seed
```js function smallestMult(n) { // Good luck! return true; } smallestMult(20); ```
## Solution
```js // solution required ```