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 224 views
1 answer 165 views
1 answer 156 views
1 answer 200 views
1 answer 184 views
...