diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md index 9b1c2e3eee6..329395c42b6 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md @@ -36,30 +36,6 @@ assert.deepEqual(addTogether(2, 3), 5); assert.deepEqual(addTogether(23, 30), 53); ``` -`addTogether(5)(7)` should return 12. - -```js -assert.deepEqual(addTogether(5)(7), 12); -``` - -`addTogether("https://www.youtube.com/watch?v=dQw4w9WgXcQ")` should return `undefined`. - -```js -assert.isUndefined(addTogether('https://www.youtube.com/watch?v=dQw4w9WgXcQ')); -``` - -`addTogether(2, "3")` should return `undefined`. - -```js -assert.isUndefined(addTogether(2, '3')); -``` - -`addTogether(2)([3])` should return `undefined`. - -```js -assert.isUndefined(addTogether(2)([3])); -``` - `addTogether("2", 3)` should return `undefined`. ```js @@ -72,6 +48,36 @@ assert.isUndefined(addTogether('2', 3)); assert.isUndefined(addTogether(5, undefined)); ``` +`addTogether("https://www.youtube.com/watch?v=dQw4w9WgXcQ")` should return `undefined`. + +```js +assert.isUndefined(addTogether('https://www.youtube.com/watch?v=dQw4w9WgXcQ')); +``` + +`addTogether(5)` should return a function. + +```js +assert.deepEqual(typeof(addTogether(5)), 'function'); +``` + +`addTogether(5)(7)` should return 12. + +```js +assert.deepEqual(addTogether(5)(7), 12); +``` + +`addTogether(2)([3])` should return `undefined`. + +```js +assert.isUndefined(addTogether(2)([3])); +``` + +`addTogether(2, "3")` should return `undefined`. + +```js +assert.isUndefined(addTogether(2, '3')); +``` + # --seed-- ## --seed-contents--