<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ellie</title>
    <description>The latest articles on DEV Community by Ellie (@is_ellie).</description>
    <link>https://dev.to/is_ellie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F540744%2F2bf6a6a0-a1d8-4615-bff0-cad5a0bfa2d6.jpeg</url>
      <title>DEV Community: Ellie</title>
      <link>https://dev.to/is_ellie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/is_ellie"/>
    <language>en</language>
    <item>
      <title>Some awesome js tricks you should know about </title>
      <dc:creator>Ellie</dc:creator>
      <pubDate>Mon, 15 Feb 2021 03:03:00 +0000</pubDate>
      <link>https://dev.to/is_ellie/some-awesome-js-tricks-you-should-know-about-27k5</link>
      <guid>https://dev.to/is_ellie/some-awesome-js-tricks-you-should-know-about-27k5</guid>
      <description>&lt;p&gt;When it comes to adding all the numbers in an array, most people would think of the 'for loop' to traverse all the numbers, but other than that, do you know you can also use array.forEach() and array.reduce()to do so? Let's take an example here!&lt;/p&gt;

&lt;p&gt;(1) array.forEach()&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flutokcryb5hndmxyl9in.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flutokcryb5hndmxyl9in.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(2) array.reduce()&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuc92gcut3z45s8p3rxbn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuc92gcut3z45s8p3rxbn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There're also lots of array tricks you may not know about, take a look at the examples below:&lt;/p&gt;

&lt;p&gt;(3) use array.reverse() to reverse a string:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdjj54aec9pq2t7647d17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdjj54aec9pq2t7647d17.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(4) repeat certain string for multiple times&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbsv5gmqhnd0ah4oojvey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbsv5gmqhnd0ah4oojvey.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We all know that spread operator can be used to split an array into a pseudo array,but it can also used to copy an object in react project! Look at the example below:&lt;/p&gt;

&lt;p&gt;(5)use spread operator to copy an object in class component.&lt;/p&gt;

&lt;p&gt;...To be continued&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>flutter</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
