Basic Javascript: Local Scope and Functions

can’t get it

function myLocalScope() {

'use strict'; // you shouldn't need to edit this line

var myVar = "5";

console.log(myVar);

}

myTest ();

myLocalScope();

// Run and check the console

// myVar is not defined outside of myLocalScope

console.log(myVar);

// Now remove the console log line to pass the test

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions

What is this? That is not necessary.

@yoelvis i tried taking it away. doesn’t solve the problem

Follow this instruction too.

1 Like

thanks. learning to read one day at a time :man_student: