JavaScript | Class And Inheritance | Question 2

Last Updated :
Discuss
Comments

How do you define a static method in a class?

Using the static keyword

By defining the method inside the constructor

Using the classMethod keyword

By adding the method directly to the prototype

Share your thoughts in the comments