Skip to content

Instantly share code, notes, and snippets.

@spikebrehm
Created August 23, 2011 06:24
Show Gist options
  • Save spikebrehm/1164473 to your computer and use it in GitHub Desktop.
Save spikebrehm/1164473 to your computer and use it in GitHub Desktop.
var name = 'Bob';
var Person = function(name){
this.name = name;
console.log(name);
}
var me = Person('John');
console.log(name);
var you = new Person('Robert');
console.log(name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment