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 226 views
1 answer 169 views
1 answer 157 views
1 answer 202 views
1 answer 187 views
...