Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: global variables

I'm assuming your two "global" variables are (Note, they way this code is written, these variables are not global): 

var arHoldAll = [];
var arCurrentDupes = [];

If you want these to be available after your routine is finished, you should add them to your `return` statement as a property.  They are currently private since they are contained within a function and are created using the `var` statement.

return {
    processRecord: function() { 
        // do something awesome
    },
    arHoldAll : arHoldAll,
    arCurrentDupes : arCurrentDupes
};

 

Cheers,
Matthew 


Viewing all articles
Browse latest Browse all 6517

Trending Articles