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 220 views
1 answer 160 views
1 answer 154 views
1 answer 200 views
1 answer 182 views
...