Created
September 18, 2018 19:57
-
-
Save mahdiyazdani/6d2f346e2743e88c157bc67bef78cc5a to your computer and use it in GitHub Desktop.
Class Instance in JavaScript
This file contains hidden or 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
| class Surgeon { | |
| constructor(name, department) { | |
| this.name = name; | |
| this.department = department; | |
| } | |
| } | |
| const surgeonCurry = new Surgeon( 'Curry', 'Cardiovascular' ); | |
| const surgeonDurant = new Surgeon( 'Durant', 'Orthopedics' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment