I have 2 3d arrays
laso:
- 0: {item: “audcad”, time: “09-17”, acc_profit: “-3.23”}
- 1: {item: “audusd”, time: “10-17”, acc_profit: “-3.29”}
- 2: {item: “audnzd”, time: “10-17”, acc_profit: “4.94”}
- 3: {item: “audusd”, time: “10-17”, acc_profit: “-2.24”}
- 4: {item: “audnzd”, time: “10-17”, acc_profit: “-3.26”}
- 5: {item: “audcad”, time: “10-17”, acc_profit: “-1.74”}
- 6: {item: “audnzd”, time: “11-17”, acc_profit: “1.81”}
- 7: {item: “audusd”, time: “11-17”, acc_profit: “-2.53”}
- 8: {item: “audnzd”, time: “11-17”, acc_profit: “-1.72”}
- 9: {item: “audcad”, time: “12-17”, acc_profit: “1.46”}
- 10: {item: “audcad”, time: “12-17”, acc_profit: “9.62”}
- 11: {item: “audusd”, time: “12-17”, acc_profit: “-2.40”}
- 12: {item: “audchf”, time: “12-17”, acc_profit: “0.29”}
- 13: {item: “audcad”, time: “01-18”, acc_profit: “-1.51”}
- 14: {item: “audcad”, time: “02-18”, acc_profit: “1.81”}
- 15: {item: “audcad”, time: “02-18”, acc_profit: “-3.37”}
- 16: {item: “gbpaud”, time: “03-18”, acc_profit: “0.13”}
and firsto:
{item: “audcad”, time: “07-17”, acc_profit: “0.00”}
these are results of console.log() of them
However
I need to turn them into 1 array where firsto comes before lasto
var datum_l = firsto.concat(lasto);
generates an errormessage:
currency_family_all.php:19 Uncaught TypeError: firsto.concat is not a function
yet, var datum_l = lasto.concat(firsto); works well
why???