<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Spread Syntax on Coderrob</title><link>https://coderrob.com/tags/spread-syntax/</link><description>Recent content in Spread Syntax on Coderrob</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 03 Mar 2022 21:28:27 -0600</lastBuildDate><atom:link href="https://coderrob.com/tags/spread-syntax/index.xml" rel="self" type="application/rss+xml"/><item><title>JavaScript Spread Syntax Explained</title><link>https://coderrob.com/posts/javascript-spread-syntax-explained/</link><pubDate>Thu, 03 Mar 2022 21:28:27 -0600</pubDate><guid>https://coderrob.com/posts/javascript-spread-syntax-explained/</guid><description>&lt;p&gt;JavaScript&amp;rsquo;s spread syntax, &lt;code&gt;...&lt;/code&gt;, lets you expand one value into another context. It is small, useful, and easy to misunderstand.&lt;/p&gt;
&lt;p&gt;The practical version is this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In an array literal, spread adds values from an iterable.&lt;/li&gt;
&lt;li&gt;In a function call, spread passes values from an iterable as separate arguments.&lt;/li&gt;
&lt;li&gt;In an object literal, spread copies an object&amp;rsquo;s own enumerable properties.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Spread expands a source into the place where you use it.&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>