Why can we access variables outside of for statement but not forEach statement?

后端 未结 0 860
挽巷
挽巷 2021-01-23 21:28

I was writing a function the other day and noticed that I couldn\'t access variables outside of a forEach statement, but I could when I changed the forEach into a for statement,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题