上面的代码 console.log(a)得到的a的值是空,我怀疑console.log(a)在for循环之前运行了 ,如果是这样,怎么才能让console.log(a)在for循环之后运行呢。小白求教 谢谢大家
网友回复
10:
then后面再加then
郑旭东:
数据库是异步的,concat这个动作有滞后
上面的代码 console.log(a)得到的a的值是空,我怀疑console.log(a)在for循环之前运行了 ,如果是这样,怎么才能让console.log(a)在for循环之后运行呢。小白求教 谢谢大家
then后面再加then
数据库是异步的,concat这个动作有滞后