diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md
index 05b254d148..42f55aad2c 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md
@@ -25,8 +25,10 @@ console.log(loc); // loc is not defined
## Instructions
myVar
inside myLocalScope
. Run the tests and then follow the instructions commented out in the editor.
-Hint
Refreshing the page may help if you get stuck.
+
+The editor has two `console.log`s to help you see what is happening. Check the console as you code to see how it changes. Declare a local variable `myVar` inside `myLocalScope` and run the tests.
+
+**Note:** The console will still have 'ReferenceError: myVar is not defined', but this will not cause the tests to fail.
myVar
inside myLocalScope
. Ru
```yml
tests:
- text: The code should not contain a global myVar
variable.
- testString: assert(typeof myVar === 'undefined');
+ testString: |
+ function declared(){
+ myVar;
+ }
+ assert.throws(declared, ReferenceError);
- text: You should add a local myVar
variable.
- testString: assert(/function\s+myLocalScope\s*\(\s*\)\s*\{\s[\s\S]+\s*var\s*myVar\s*(\s*|=[\s\S]+)\s*;[\s\S]+}/.test(code));
+ testString: assert(/functionmyLocalScope\(\)\{.+(var|let|const)myVar.*}/s.test(code.replace(/\s/g, '')));
```
@@ -55,53 +61,14 @@ function myLocalScope() {
// Only change code below this line
- console.log(myVar);
+ console.log('inside myLocalScope', myVar);
}
myLocalScope();
// Run and check the console
// myVar is not defined outside of myLocalScope
-console.log(myVar);
+console.log('outside myLocalScope', myVar);
-// Now remove the console log line to pass the test
-
-```
-
-
-
-### Before Test
-