From 4181e2a0f9b22d2a526db9eaa66b2a7bbe89acea Mon Sep 17 00:00:00 2001 From: Andrii Bida Date: Wed, 18 Jan 2017 13:26:24 +0100 Subject: [PATCH] fix(seed) : Update example in Local Scopes and Functions (#12594) --- .../basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index e50a2657bf..cae402a17e 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -2509,7 +2509,7 @@ "description": [ "Variables which are declared within a function, as well as the function parameters have local scope. That means, they are only visible within that function.", "Here is a function myTest with a local variable called loc.", - "
function myTest() {
var loc = \"foo\";
console.log(loc);
}
myTest(); // \"foo\"
console.log(loc); // \"undefined\"
", + "
function myTest() {
var loc = \"foo\";
console.log(loc);
}
myTest(); // logs \"foo\"
console.log(loc); // loc is not defined
", "loc is not defined outside of the function.", "

Instructions

", "Declare a local variable myVar inside myLocalScope. Run the tests and then follow the instructions commented out in the editor.",