Are you sure you're getting this? Click the correct answer from the options.
What would be the output of the following code snippet?
JAVASCRIPT
1const scopeCheck = () => {
2 let localScope = "LOCAL";
3 const innerScopeCheck = () => {
4 let innerLocalScope = "INNER LOCAL";
5 return globalScope + " { " + localScope + " { " + innerLocalScope + " }} ";
6 }
7 return innerScopeCheck;
8}
9let globalScope = "GLOBAL";
10console.log(scopeCheck()());
Click the option that best answers the question.
- Error
- scopeCheck() is undefined
- GLOBAL { LOCAL { INNER LOCAL } }
- None of the above