I am currently working on an implementation that involves the following code snippet:
var globalVar = [];
var tomakeJson = JSON.Stringify(globalVar);
window.load = function grpwrk() {
hdWork: function() {
// return somefatherwork;
};
asstWork: function() {
// return somemotherWork;
};
};
In order to call a function, I use the following code:
globalVar.push(familyWork(hdWork()));
globalVar.push(familyWork(asstWork()));
The variable tomakeJson
is then sent to the backend server and stored in a NoSQL database.
Is this the correct way to implement this functionality? Are there any alternative approaches for utilizing these types of functions?