在 IE11 Symbol.Iterator 中,当我对每个元素数组使用时出现错误?

In IE11 Symbol.Iterator is giving error when i am using for each on array of elements?

我正在尝试循环按钮数组并在运行时创建反应组件按钮,该错误仅在 IE 11 中可重现,我在 Symbol 中遇到错误。迭代器,这意味着我传递的数组无效并且无法返回内部迭代器,但这适用于任何其他浏览器,这是 IE 的问题还是我正在使用 jQuery 选择器来获取按钮数组.

export default function(buttons){

   for(let button of buttons){
       //Code for creating button as react component button.
   }
}

//call to replaceButtons


var btns = $('.continue-buttons');
replaceButtons(btns);

获取错误 SYMBOL.ITERATOR

我知道这不是编写 React 代码的优化方式,但需求和设计是一个很大的挑战。

jQuery 不是 return 数组,它 return 是一个 jQuery 集合。 这确实是不可迭代的。 It actually is 自 v1.12/v2.2 以来。

然而,Internet Explorer 11 just doesn't support iterators or for of loops根本没有。