-
Notifications
You must be signed in to change notification settings - Fork 3
why can not use for...of in this time?
Hill Liu edited this page Dec 30, 2019
·
4 revisions
Table of Contents
Because bebel will transpiler code to "Symbol.iterator", it is not support on IE11.
for (var _iterator = foo, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var i = _ref;
}