Skip to content

Make jQuery collections for-of-able #1693

@simevidas

Description

@simevidas

Chrome 38 added support for ES6 for-of. I'm proposing that jQuery collections are made compatible with this statement, which can be achieved with this line (from discussion on Twitter):

jQuery.prototype[Symbol.iterator] = Array.prototype.values;

Live demo: http://jsbin.com/movuxu/1/edit (view in Chrome)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions