<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Iterators on CodingBlast</title><link>https://codingblast.com/tags/iterators/</link><description>Recent content in Iterators on CodingBlast</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 17 May 2017 06:16:23 +0000</lastBuildDate><atom:link href="https://codingblast.com/tags/iterators/index.xml" rel="self" type="application/rss+xml"/><item><title>Generators in JavaScript - Introduction</title><link>https://codingblast.com/generators/</link><pubDate>Sat, 15 Apr 2017 19:29:55 +0000</pubDate><guid>https://codingblast.com/generators/</guid><description>&lt;h2 id="introduction-to-generators"&gt;Introduction to generators&lt;/h2&gt;
&lt;p&gt;A generator function is a special kind of function that was introduced in ES2015 (ES6). In JavaScript once we start a function it has to run to its completion. However, generator functions enable us to create functions that another code can reenter multiple times. Furthermore, nothing from outside of the generation function can make it exit/pause. Generator function pauses itself when it runs into a &lt;code&gt;yield&lt;/code&gt; expression. Once a execution reaches &lt;code&gt;yield&lt;/code&gt; expression, generator can not continue execution on its own. Something from &lt;em&gt;outside&lt;/em&gt; has to &lt;em&gt;continue&lt;/em&gt;its execution.&lt;/p&gt;</description></item><item><title>JavaScript Iterators</title><link>https://codingblast.com/iterators/</link><pubDate>Wed, 12 Apr 2017 19:40:44 +0000</pubDate><guid>https://codingblast.com/iterators/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When we talk about iterators there are two main protocols to be aware of: &lt;em&gt;iterables&lt;/em&gt; and &lt;em&gt;iterators&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Iterables are data structures that can be iterated. Such example is array, since we can loop through every element of array.&lt;/p&gt;</description></item></channel></rss>