Skip to content

Instantly share code, notes, and snippets.

@rileyhilliard
Last active April 13, 2019 00:15
Show Gist options
  • Save rileyhilliard/fda6c7bee97e80af58bbdbf4b9ebb759 to your computer and use it in GitHub Desktop.
Save rileyhilliard/fda6c7bee97e80af58bbdbf4b9ebb759 to your computer and use it in GitHub Desktop.
Class Example
// Example of a valid class instantiation that contains
// all the required class constructor object properties
import Person from 'person';
// Create a new person of the shape defined by our interfaces
const john = new Person ({
first: 'John',
last: 'Doe',
geo: {
country: 'USA',
state: 'California'
}
});
// My name is John Doe, and I am from California, USA
john.whoAmI();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment