Created
April 30, 2014 14:40
-
-
Save nealfennimore/11428952 to your computer and use it in GitHub Desktop.
Global Variables Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How many globals? 4 with console.log | |
function Person(name) { | |
this.name = name; | |
} | |
function greeting(person) { | |
console.log("Hello" + person.name); | |
} | |
var roger = new Person("Roger"); | |
greeting(roger); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment