Javascript - how to create static variables

 totalStaticFun = function(sum) {
        if(typeof self.cnt != 'number')cnt = sum;
        return cnt;
    };

the value that is returned remains static in javascript

0 comments: