Last active
April 13, 2019 00:15
-
-
Save rileyhilliard/fda6c7bee97e80af58bbdbf4b9ebb759 to your computer and use it in GitHub Desktop.
Class Example
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
// 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