{"json_modified": "2015-09-08T22:54:43.468380", "slug": "Web/JavaScript/Guide/iterable", "tags": [], "locale": "zh-CN", "title": "\u53ef\u8fed\u4ee3\u5bf9\u8c61", "translations": [{"title": "iterable", "url": "/en-US/docs/Web/JavaScript/Guide/iterable", "tags": ["ECMAScript6", "Experimental", "Iterator", "Exp\u00e9rimental", "JavaScript"], "summary": "One addition of ECMAScript 6 is not new syntax or a new built-in, but a protocol. This protocol can be implemented by any object respecting some conventions.", "localization_tags": [], "locale": "en-US", "last_edit": "2014-12-10T02:27:35", "review_tags": ["technical"]}, {"title": "iterable", "url": "/fr/docs/Web/JavaScript/Guide/iterable", "tags": ["JavaScript", "Reference", "Advanced", "R\u00e9f\u00e9rence", "iterables", "ECMAScript6"], "summary": "Le protocole it\u00e9rable permet \u00e0 des objets JavaScript de d\u00e9finir le comportement qu'ils auront lorsqu'utilis\u00e9s dans des boucles telles que for..of
. Certains types natifs comme Array
ou Map
, disposent naturellement de fonctionnalit\u00e9s d'it\u00e9rations. D'autres types, comme Object
n'ont pas cette fonctionnalit\u00e9.", "localization_tags": [], "locale": "fr", "last_edit": "2014-12-08T12:54:36", "review_tags": []}], "modified": "2015-09-08T22:54:42", "label": "\u53ef\u8fed\u4ee3\u5bf9\u8c61", "localization_tags": ["inprogress"], "url": "/zh-CN/docs/Web/JavaScript/Guide/iterable", "last_edit": "2015-09-08T22:54:38", "summary": "The \"iterable\" protocol allows JavaScript objects to define or customize their iteration behavior, such as what values are looped over in a for..of
construct. Some built-in types, such as Array
or Map
, have a default iteration behavior, while other types (such as Object
) do not.", "sections": [{"id": "\u8fed\u4ee3\u534f\u8bae", "title": "\u8fed\u4ee3\u534f\u8bae"}, {"id": "\u8fed\u4ee3_\u534f\u8bae", "title": "\"\u8fed\u4ee3\" \u534f\u8bae"}, {"id": "The_iterator_protocol", "title": "The \"iterator\" protocol"}, {"id": "\u4f7f\u7528\u8fed\u4ee3\u5bf9\u8c61\u7684\u5b9e\u4f8b", "title": "\u4f7f\u7528\u8fed\u4ee3\u5bf9\u8c61\u7684\u5b9e\u4f8b"}, {"id": "\u521b\u5efa\u8fed\u4ee3", "title": "\u521b\u5efa\u8fed\u4ee3"}, {"id": "\u7528\u6237\u5b9a\u4e49\u8fed\u4ee3\u5bf9\u8c61", "title": "\u7528\u6237\u5b9a\u4e49\u8fed\u4ee3\u5bf9\u8c61"}, {"id": "\u57fa\u4e8eAPI\u5efa\u7acb\u8fed\u4ee3", "title": "\u57fa\u4e8eAPI\u5efa\u7acb\u8fed\u4ee3"}, {"id": "Syntaxes_need_iterables", "title": "Syntaxes need iterables"}, {"id": "Non-well-formed_iterables", "title": "Non-well-formed iterables"}, {"id": "A_generator_object_is_an_iterator_or_an_iterable", "title": "A generator object is an iterator or an iterable?"}], "id": 131299, "review_tags": []}