Skip to content

Instantly share code, notes, and snippets.

@awps
Created Jul 20, 2018
Embed
What would you like to do?
class Person {
constructor($name){
this._name = $name;
}
getName(){
return `Hello ${this._name}`;
}
}
$person = new Person('John');
console.log($person.getName()); // Hello John
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment