Dev Tools Intro

Debugging Intro

debugger;

console.log('Hello World!');

Scope - Global

debugger;

function aFunction () {
  console.log('Hello World from aFunction');
};

var aVar = 'Hello World from aVar';

let aLet = 'Hello World from aLet';

const aConst = 'Hello World from aConst';

Scope - Local

debugger;

function aGreeting (greeting, greetingName) {
  return function () {
    const msg = greeting + ' ' + greetingName + '!';
    return msg
  }
};

const aGreet = (greetName) => {
  return aGreeting('Hello', greetName)
}

let aGreetWorld = aGreet('World');

var aWholeGreeting = aGreetWorld();

console.log(aWholeGreeting);

Call Stack

Scope - Function vs Block

debugger
var things = [];
for (var i = 0; i < 3; i++) {
  things[i] = function() {
    console.log(i);
  };
}

things[0]();
things[1](); 
things[2]();

Slide Title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.