I am new and going on javascript way. At the point of Closure. I can create object with new keyword and without new keyword, it is so weird me.
Here code:-
          function RankingManage(rank) {
                var rank = rank;
                function rankInc() {
                    rank++;
                }
                function rankDec() {
                    rank--;
                }
                return {
                    makeInc: function () {
                        rankInc();
                    },
                    makeDec: function () {
                        rankDec();
                    },
                    showRank: function () {
                        return rank;
                    }
                }
            }
            var Rank = new RankingManage(80);
            var Rank2 = RankingManage(80);
            Rank.makeInc();
            Rank2.makeInc();
            console.log(Rank.showRank());//Output:- 81
            console.log(Rank2.showRank());//Output:- 81
 
     
     
     
    