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 210 views
1 answer 152 views
1 answer 146 views
1 answer 197 views
1 answer 174 views
...