Skip to content

Instantly share code, notes, and snippets.

@paschalidi
Created December 13, 2019 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paschalidi/39dab7c6bb6a1d7a7de3980fd6c2925c to your computer and use it in GitHub Desktop.
Save paschalidi/39dab7c6bb6a1d7a7de3980fd6c2925c to your computer and use it in GitHub Desktop.
what will be consoled?
function Person(name) {
this.name = name;
}
var person = Person('John');
console.log(person);
console.log(person.name);
var person = new Person('John');
console.log(person);
console.log(person.name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment