Last active
July 1, 2016 15:14
-
-
Save johnmmoss/8a1462c1066be8abba56f2eafcf2890b to your computer and use it in GitHub Desktop.
Using ECMA 6 Class keyword
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
'use strict' | |
class Monkey { | |
constructor(name, color) { | |
this.color = color; | |
this.name = name; | |
} | |
} | |
var bert = new Monkey("albert", "red"); | |
console.log(bert.name) // albert | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment