From 0a3690572cc22bb6e092ca36e999ce6d79d2a7a5 Mon Sep 17 00:00:00 2001 From: Radi Totev Date: Tue, 29 Mar 2022 16:36:13 +0100 Subject: [PATCH] fix: failing challenge test because of commented out code (#45492) id: 587d7b87367417b2b2512b43 title: Use Arrow Functions to Write Concise Anonymous Functions forumTopicId: 301211 dashedName: use-arrow-functions-to-write-concise-anonymous-functions User code tests fail when seed code is left and commented out. --- ...-arrow-functions-to-write-concise-anonymous-functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md index bcf4507370..698e76c9ed 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md @@ -45,13 +45,13 @@ Rewrite the function assigned to the variable `magic` which returns a `new Date( You should replace the `var` keyword. ```js -(getUserInput) => assert(!getUserInput('index').match(/var/g)); +assert.notMatch(code, /var/g) ``` `magic` should be a constant variable (by using `const`). ```js -(getUserInput) => assert(getUserInput('index').match(/const\s+magic/g)); +assert.match(code, /const\s+magic/g) ``` `magic` should be a `function`. @@ -69,7 +69,7 @@ assert(magic().setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 0, 0)); The `function` keyword should not be used. ```js -(getUserInput) => assert(!getUserInput('index').match(/function/g)); +assert.notMatch(code, /function/g) ``` # --seed--