diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md
index f2fa09ce03..413853a3ae 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md
@@ -28,7 +28,7 @@ tests:
- text: Your function incrementer
should not change the value of fixedValue
.
testString: assert(fixedValue === 4, 'Your function incrementer
should not change the value of fixedValue
.');
- text: Your incrementer
function should take a parameter.
- testString: assert(code.match(/function\s+?incrementer\s*?\(.+?\)/g), 'Your incrementer
function should take a parameter.');
+ testString: assert(incrementer.length === 1, 'Your incrementer
function should take a parameter.');
- text: Your incrementer
function should return a value that is one larger than the fixedValue
value.
testString: assert(newValue === 5, 'Your incrementer
function should return a value that is one larger than the fixedValue
value.');
@@ -66,6 +66,12 @@ console.log(fixedValue); // Should print 4
```js
-// solution required
+// the global variable
+var fixedValue = 4;
+
+const incrementer = val => val + 1;
+
+var newValue = incrementer(fixedValue); // Should equal 5
+console.log(fixedValue); // Should print 4
```