-1
我試圖返回2個函數的結果,但我沒有成功。我做了以下情況:在JavaScript中返回多個函數的結果
var x = getFunctionResults1(items);
var y = getFunctionResults2(items);
return {x,y}
但是,讓這樣的輸出:
[ { x: [ [Object], [Object], [Object], [Object], [Object] ],
y: [ [Object] ] },
{ x: [ [Object], [Object] ], y: [ [Object] ] } ]