Tell us what’s happening:
// running tests You should add a local
myVar
variable. // tests completed // console output SyntaxError: invalid regular expression flag s
Your code so far
function myLocalScope() {
'use strict';
// Only change code below this line
var myVar = 'foo';
console.log('inside myLocalScope', myVar);
}
myLocalScope();
// Run and check the console
// myVar is not defined outside of myLocalScope
console.log('outside myLocalScope', myVar);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0.
function myLocalScope() {
'use strict';
// Only change code below this line
var myVar = 'hello';
console.log('inside myLocalScope', myVar);
}
myLocalScope();
// Run and check the console
// myVar is not defined outside of myLocalScope
console.log('outside myLocalScope', myVar);
Change your browser if the problem persists. use chrome.