<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Promises on CodingBlast</title><link>https://codingblast.com/tags/promises/</link><description>Recent content in Promises 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/promises/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></channel></rss>