Saturday, January 28, 2017

javascript - Adding functions to the same namespace

I have the following code in a .js file. How do I add new functions within the same namespace from a different .js file?



if ("undefined" == typeof(sample)) {
var sample = {};
}

sample = {
foo : function () {


},

bar : function () {

}
};

No comments:

Post a Comment