Skip to content

Instantly share code, notes, and snippets.

@nealfennimore
Created April 30, 2014 14:40
Show Gist options
  • Save nealfennimore/11428952 to your computer and use it in GitHub Desktop.
Save nealfennimore/11428952 to your computer and use it in GitHub Desktop.
Global Variables Javascript
// 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