Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: global variables

$
0
0

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


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>