/javascript-scope-examples

Javascript scope examples for teaching demo

Primary LanguageJavaScript

JavaScript Scope Examples

Purpose

These JavaScript variable and function scoping examples were generated for my teaching demo with Girl Develop It. The purpose of the examples is to develop and deepen a beginner's understanding of scope with variables and functions.

Index.html

###Check out:

  • Objectives you can expect to learn
  • Read the instructions of How To...
  • A few things you should know
  • Before You Run the Code
  • POST running the javascript - WHOA! What just happened? Reflection questions

How to run these examples

  1. fork / clone this repo
  2. open the index.html page
  3. open the dev tools in google Chrome browser - Command + Option + I OR right click and choose "Inspect" - Have the console open
  4. You should see the first example log to the console
  5. Move through each example, one by one by uncommenting any relevant javascript and console.log statements

I hope you can learn something new through these examples!