forEach 循环没有正确循环

问题描述

我有以下代码

array.forEach(function(x){
  console.log("inside foreach")

  const getData = async () => {
  try {
   const jsonValue = await AsyncStorage.getItem("item")
   if(jsonValue != null){

   console.log("not null")

   }else{

   console.log("null")

   }
   }
   getData()
})

它无法正常工作,输出首先检索所有“内部 foreach”,然后检索其余部分。我该如何解决?谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)