How to call static method in JavaSript

1 Answer

0 votes
class StaticMethodsClass 
{
    static staticMethod() 
    {
        return 'Static method';
    }
}
document.write(StaticMethodsClass.staticMethod()); 

/*
run:

Static method 

*/

 



answered Aug 18, 2016 by avibootz

Related questions

1 answer 318 views
1 answer 237 views
1 answer 234 views
1 answer 284 views
1 answer 265 views
...