Exercise – Scope

by Amanda HUNTER

JavaScript

/**
 * Exercise:
 *
 * Function Scope
 *
 * Work in the console, or use "console.log()" to output to the console 
 * from the script
 *
 * Write two functions that share the same, global variable
 * 	- Verify this by logging the value of the variable to the console 
 *    from within each function
 * Write two functions that share a non-global variable
 *  - Verify this by logging the value of the variable to the console 
 *    from within each function
 */