fix(curriculum): make example less confusing (#45088)

* Local scope and functions: Make the example less confusing

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
This commit is contained in:
Madhu Sudhan Reddy Vinta
2022-02-12 01:38:46 +05:30
committed by GitHub
parent 7fe4695794
commit 0a895dad47

View File

@ -23,7 +23,7 @@ myTest();
console.log(loc); console.log(loc);
``` ```
The `myTest()` function call will display the string `foo` in the console. The `console.log(loc)` line will throw an error, as `loc` is not defined outside of the function. The `myTest()` function call will display the string `foo` in the console. The `console.log(loc)` line (outside of the `myTest` function) will throw an error, as `loc` is not defined outside of the function.
# --instructions-- # --instructions--