Trouble shooting

Tell us what’s happening:

cannot test/run code due to persistent message on console: “TypeError: Cannot read property ‘presets’ of undefined”

Your code so far

function checkScope() {
'use strict';
let i = 'function scope';
if (true) {
 let 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 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36.

Challenge: Compare Scopes of the var and let Keywords

Link to the challenge:

Maybe try pressing the “Reset All Code” button, refreshing your browser, then copying your solution back in.

1 Like