Created
December 22, 2022 06:35
-
-
Save saloni137/07a330b925417f1a2f84796a060d7319 to your computer and use it in GitHub Desktop.
Method
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
class Dog{ | |
bark(){ | |
console.log("dog has barked"); | |
} | |
} | |
let dog = new Dog(); | |
dog.bark(); // you cannot call bark with "Dog" class instance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment