I want to concat two arrays. In the code below i am only getting txs_history array.
getFirstArray(function(txs) {
getSecondArray(function(txs_history) {
txs.concat(txs_history);
res.send(txs_history);
});
});
From my knowledge i can guess that txs var can't be read inside getSecondArray and that's why it is only sent txs_history. I can't figure out how to solve this scope issue.
Regards,
txswouldn't be in scope, you'd get an exception that says so.