From 9c1b83dd0cba36aef907d48b87d9e5c4e4353836 Mon Sep 17 00:00:00 2001 From: moT01 Date: Tue, 25 Jun 2019 19:21:33 -0500 Subject: [PATCH] fix/add-tests+note-in-import-lesson --- .../create-an-export-fallback-with-export-default.english.md | 2 +- .../es6/import-a-default-export.english.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.english.md index bac163ac7e..5cfe2b3f3a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.english.md @@ -30,7 +30,7 @@ The following function should be the fallback value for the module. Please add t ```yml tests: - text: Your code should use export fallback. - testString: assert(code.match(/export\s+default\s+function\s+subtract\s*\(\s*x,\s*y\s*\)\s*{/g)); + testString: assert(code.match(/export\s+default\s+function(\s+subtract\s*|\s*)\(\s*x,\s*y\s*\)\s*{/g)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/import-a-default-export.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/import-a-default-export.english.md index 2054116735..7f09374960 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/import-a-default-export.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/import-a-default-export.english.md @@ -12,12 +12,12 @@ In the last challenge, you learned about export default and its use import add from "./math_functions.js"; ``` -The syntax differs in one key place. The imported value, add, is not surrounded by curly braces ({}). The primary method of importing a default export is to simply write the value's name after import. +The syntax differs in one key place. The imported value, add, is not surrounded by curly braces ({}). add here is simply a variable name for whatever the default export of the math_functions.js file is. You can use any name here when importing a default. ## Instructions
-In the following code, import the default export, subtract, from the file math_functions.js, found in the same directory as this file. +In the following code, import the default export from the math_functions.js file, found in the same directory as this file. Give the import the name subtract.
## Tests