Skip to content

Instantly share code, notes, and snippets.

@AsaoluElijah
Created December 6, 2019 00:59
Show Gist options
  • Save AsaoluElijah/c990939efcf358036f256fda7d164859 to your computer and use it in GitHub Desktop.
Save AsaoluElijah/c990939efcf358036f256fda7d164859 to your computer and use it in GitHub Desktop.
// 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