Created
December 6, 2019 00:59
-
-
Save AsaoluElijah/c990939efcf358036f256fda7d164859 to your computer and use it in GitHub Desktop.
This file contains 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
// Our Animal Class | |
class Animal{ | |
// A class method | |
sayHello(){ | |
console.log('Hello World'); | |
} | |
} | |
// Creating a new object | |
const dog = new Animal; | |
dog.sayHello(); //Hello World |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment