prototype.Symbol.iterator

最后更新于:2022-04-02 00:06:39

## prototype.Symbol.iterator + [link](./prototype-Symbol-iterator "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L7388 "View in source.") + [npm](https://www.npmjs.com/package/lodash.prototype.symbol.iterator "See the npm package.") ``` _.prototype.Symbol.iterator() ``` 启用包装对象为 iterable。 ### 返回值 (Object) 返回包装对象 ### 示例 ``` var wrapped = _([1, 2]); wrapped[Symbol.iterator]() === wrapped; // => true Array.from(wrapped); // => [1, 2] ```
';