--- id: 587d7dab367417b2b2512b70 title: Introduction to Currying and Partial Application challengeType: 1 videoUrl: '' localeTitle: Введение в каррирование и частичное применение --- ## Description undefined ## Instructions
Заполните тело функции add чтобы он использовал currying для добавления параметров x , y и z .
## Tests
```yml tests: - text: '' testString: 'assert(add(10)(20)(30) === 60, "add(10)(20)(30) should return 60.");' - text: add(1)(2)(3) должен вернуть 6 . testString: 'assert(add(1)(2)(3) === 6, "add(1)(2)(3) should return 6.");' - text: add(11)(22)(33) должен вернуться 66 . testString: 'assert(add(11)(22)(33) === 66, "add(11)(22)(33) should return 66.");' - text: 'Ваш код должен содержать заключительный оператор, который возвращает x + y + z .' testString: 'assert(code.match(/[xyz]\s*?\+\s*?[xyz]\s*?\+\s*?[xyz]/g), "Your code should include a final statement that returns x + y + z.");' ```
## Challenge Seed
```js function add(x) { // Add your code below this line // Add your code above this line } add(10)(20)(30); ```
## Solution
```js // solution required ```