我是Node JS的新手。我的回调收到错误。这是我的代码:
install.packages('MTS')
install.packages('rmgarch')
install.packages('gogarch')
library('MTS')
library('rmgarch')
library('gogarch')
data(dji30ret)
spec <- gogarchspec()
fit <- gogarchfit(
spec = spec,
data = dji30ret[,1:4],
out.sample = 10,
gfun = "tanh"
)
forecast <- gogarchforecast(
fit,
n.ahead =1,
n.roll = 9
)
forecast
回调(null,data,null)返回错误。如果你能帮助我,我会很高兴。
答案 0 :(得分:0)
行
问题list.forEach(函数(价值,回调)
无需传递价值。它在内部可用。
演示试试以下代码段
var list=['382813587410259968','881413399304863744'];
function callback(item, index) {
console.log("index[" + index + "]: " + item );
}
list.forEach(callback);
您还可以参考以下链接以获得更清晰
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_foreach