Tell us what’s happening:
Describe your issue in detail here.
Do I put return = “function scope”; ?
Your code so far
function checkScope() {
i = 'function scope';
if (true) {
if i = 'block scope';
console.log('Block scope i is: ', i);
}
console.log('Function scope i is: ', i);
return i;
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: ES6 - Compare Scopes of the var and let Keywords
Link to the challenge: