From e4960e38ef13c960d034341f5c89c4b123f46a51 Mon Sep 17 00:00:00 2001 From: Nakul Nambiar <39953357+nakul251197@users.noreply.github.com> Date: Mon, 3 Aug 2020 04:54:16 +0530 Subject: [PATCH] fix(curriculum): Removed global variable and updated test for "Functional Programming: Apply Functional Programming to Convert Strings to URL Slugs" (#39359) * Fixed Some Typos * Removed global variable and updated tests Co-authored-by: nakulnambiar --- ...programming-to-convert-strings-to-url-slugs.english.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md index baacc3ef3e..4ea8c1bd9f 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md @@ -27,8 +27,6 @@ The output should not have any spaces ```yml tests: - - text: The globalTitle variable should not change. - testString: assert(globalTitle === "Winter Is Coming"); - text: Your code should not use the replace method for this challenge. testString: assert(!code.match(/\.?[\s\S]*?replace/g)); - text: urlSlug("Winter Is Coming") should return "winter-is-coming". @@ -50,9 +48,6 @@ tests:
```js -// The global variable -var globalTitle = "Winter Is Coming"; - // Only change code below this line function urlSlug(title) { @@ -71,9 +66,6 @@ function urlSlug(title) {
```js -// The global variable -var globalTitle = "Winter Is Coming"; - // Only change code below this line function urlSlug(title) { return title.trim().split(/\s+/).join("-").toLowerCase();