jkabot
06/13/2018, 9:21 PMwindow
object
another is to declare your variable in a closure shared by both functions
e.g. in ss2
define(... , function( ... ) {
var shared;
function pageInit(ctx) {
shared = 'hello';
}
function saveRecord(ctx) {
console.log(shared);
return true;
}
return {
pageInit: pageInit,
saveRecord: saveRecord
};
});