Skip to content Skip to sidebar Skip to footer

Return Objects From Nested Functions?

I am trying to return objects inside of a function as an object inside of another function: function () { // body... var dailyPrice = null; function fun1(

Solution 1:

Change the code to this:

return {
                    getallrates: function(source, $scope){
                        return getRate(source, $scope);                            
                    },
                    init: function(xml) {
                        parseXml(xml);
                    },
                }

Post a Comment for "Return Objects From Nested Functions?"