Skip to content

Instantly share code, notes, and snippets.

@dnshko
Last active July 31, 2020 10:25
Show Gist options
  • Save dnshko/15e2ae59ca61aa31a45b8466dd905556 to your computer and use it in GitHub Desktop.
Save dnshko/15e2ae59ca61aa31a45b8466dd905556 to your computer and use it in GitHub Desktop.
REACT AND JAVASCRIPT CLASSES
class Developer {
constructor(firstname, lastname) {
this.firstname = firstname;
this.lastname = lastname;
}
getName() {
return this.firstname + ' ' + this.lastname;
}
}
var me = new Developer('DINESH', 'KO');
console.log(me.getName());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment