Last active
December 22, 2016 17:49
-
-
Save aramkoukia/50049c6b8e9f3357453b57c4b8c0ce70 to your computer and use it in GitHub Desktop.
JavaScript Class, Class constructor and usage
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 Profile { | |
constructor(name) { | |
console.log('User ${name} was created.'); | |
this.name = name; | |
} | |
} | |
// How to instantiate the class | |
const user = new MyClass('Aram'); // logs: "User Aram was created" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment