--- title: Greatest common divisor id: 5a23c84252665b21eecc7e82 challengeType: 5 videoUrl: '' localeTitle: Наибольший общий делитель --- ## Description
Напишите функцию, которая возвращает наибольший общий делитель двух целых чисел.
## Instructions
## Tests
```yml tests: - text: gcd должна быть функцией. testString: 'assert(typeof gcd=="function","gcd should be a function.");' - text: 'gcd(24,36) должен вернуть число.' testString: 'assert(typeof gcd(24,36)=="number","gcd(24,36) should return a number.");' - text: 'gcd(24,36) должен вернуть 12 .' testString: 'assert.equal(gcd(24,36),12,"gcd(24,36) should return 12.");' - text: 'gcd(30,48) должен вернуть 6 .' testString: 'assert.equal(gcd(30,48),6,"gcd(30,48) should return 6.");' - text: 'gcd(10,15) должен вернуть 5 .' testString: 'assert.equal(gcd(10,15),5,"gcd(10,15) should return 5.");' - text: 'gcd(100,25) должен вернуть 25 .' testString: 'assert.equal(gcd(100,25),25,"gcd(100,25) should return 25.");' - text: 'gcd(13,250) должен вернуть 1 .' testString: 'assert.equal(gcd(13,250),1,"gcd(13,250) should return 1.");' - text: 'gcd(1300,250) должен вернуть 50 .' testString: 'assert.equal(gcd(1300,250),50,"gcd(1300,250) should return 50.");' ```
## Challenge Seed
```js function gcd(a, b) { // Good luck! } ```
## Solution
```js // solution required ```