<?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: Dallas Reedy</title>
    <description>The latest articles on DEV Community by Dallas Reedy (@dallas).</description>
    <link>https://dev.to/dallas</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%2F145561%2F1780201d-a741-40ff-9a86-5c6412670d80.png</url>
      <title>DEV Community: Dallas Reedy</title>
      <link>https://dev.to/dallas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dallas"/>
    <language>en</language>
    <item>
      <title>Getting Loopy with JavaScript</title>
      <dc:creator>Dallas Reedy</dc:creator>
      <pubDate>Tue, 16 Apr 2019 01:59:04 +0000</pubDate>
      <link>https://dev.to/dallas/getting-loopy-with-javascript-4j4p</link>
      <guid>https://dev.to/dallas/getting-loopy-with-javascript-4j4p</guid>
      <description>&lt;p&gt;Here are five ways you can loop 5 times in JavaScript and do something with a different value each time through the loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* totally manual with a while loop */&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="cm"&gt;/* classic for loop */&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello there, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cm"&gt;/* new-age for...of loop */&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello once more, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cm"&gt;/* using forEach with manually filled array */&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;l&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello again, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="cm"&gt;/* auto-fill an array of length 5 and use indices */&lt;/span&gt;
&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello one last time, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What other ways can we loop a specific number of times in JavaScript?&lt;/p&gt;

&lt;p&gt;Warm regards,&lt;br&gt;
Dallas&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>loops</category>
      <category>exploration</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Re-Learning JavaScript</title>
      <dc:creator>Dallas Reedy</dc:creator>
      <pubDate>Tue, 02 Apr 2019 03:22:03 +0000</pubDate>
      <link>https://dev.to/dallas/re-learning-javascript-5co0</link>
      <guid>https://dev.to/dallas/re-learning-javascript-5co0</guid>
      <description>&lt;p&gt;When I first started learning JavaScript back in 2006, I was fresh out of college with a degree in Graphic Design focused on print media, living with friends in a rental house, and working at my second post-collegiate “design” job. In my spare time I built a stupid-simple “web app” that looked up a directory on my computer which was full of directories of musical artists, and each of those were full of directories of albums, and each of those, of course, was full of MP3s. I had made a little music catalog that I could browse through! It even had some pretty slick animations (for the time) when you opened up or closed any of the sub-directories. How fantastic!&lt;/p&gt;

&lt;p&gt;Since those early vanilla days, I’ve learned to live in library land with tools like &lt;a href="http://prototypejs.org/"&gt;Prototype&lt;/a&gt; &amp;amp; &lt;a href="http://script.aculo.us/"&gt;Script.aculo.us&lt;/a&gt; during the &lt;a href="https://weblog.rubyonrails.org/2007/1/19/prototype-1-5-now-with-a-manual/"&gt;early days of my Ruby on Rails&lt;/a&gt; journey, &lt;a href="https://jquery.com/"&gt;jQuery&lt;/a&gt; a &lt;em&gt;lot&lt;/em&gt; since those early days, and other bits &amp;amp; pieces like &lt;a href="https://underscorejs.org/"&gt;Underscore.js&lt;/a&gt; and &lt;a href="https://lodash.com/"&gt;Lodash&lt;/a&gt; as time has gone on. I’ve also been thrust into various frameworks, like &lt;a href="https://angularjs.org/"&gt;AngularJS&lt;/a&gt;, &lt;a href="https://angular.io/"&gt;Angular (2.0 &amp;amp; beyond)&lt;/a&gt;, and, much more recently, &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Deep down I’ve always had a love for JavaScript – as quirky as it is at times! I fell in love with the technologies of the web part way through my collegiate experience when I was introduced to the world of CSS via &lt;a href="http://www.csszengarden.com/"&gt;CSS Zen Garden&lt;/a&gt; and I happily said goodbye to all those table-based layouts and the ways of Web 1.0.&lt;/p&gt;

&lt;p&gt;Lately I’ve been wanting to actually learn some of the computer programming basics that I never formally learned. Sure, I’ve been using many of the concepts, techniques, styles, and best-practices just by mimicking the tutorials and open-source code repos I’ve digested along the way, but I recently had an experience that made me realize it’s probably way past time I at least knew the names and basic details of these things.&lt;/p&gt;

&lt;p&gt;So, I’ve been working my way through &lt;a href="https://eloquentjavascript.net/"&gt;Marijn Haverbeke’s “Eloquent JavaScript”&lt;/a&gt; online book. The best part about it has been the live code examples that you can just click into and start modifying, as well as the live code exercises at the end of each chapter. I really appreciate the author’s style of breaking down each chapter’s concepts into bite-size chunks, applied to some plausibly real-world example that you can totally play along with at home.&lt;/p&gt;

&lt;p&gt;I’ve also been playing a few levels of &lt;a href="https://alexnisnevich.github.io/untrusted/"&gt;Untrusted&lt;/a&gt;, a meta-JavaScript adventure game &lt;a href="https://github.com/AlexNisnevich/untrusted"&gt;by Alex Nisnevich &amp;amp; Greg Shuflin&lt;/a&gt;, nearly every day to compliment what I learn from the day’s chapter of “Eloquent JavaScript.”&lt;/p&gt;

&lt;p&gt;It’s really been a lot of fun learning a bunch of new concepts, putting names to existing concepts, and even stretching my decade-old knowledge of what JavaScript is and what it can do. I’ll likely be sharing some of my learnings along the way throughout my blog and on Dev.to as well. &lt;strong&gt;1)&lt;/strong&gt; because it really helps me to learn better and to better retain what I learn when I share it, and &lt;strong&gt;2)&lt;/strong&gt; because it might actually be helpful to other people embarking on a similar journey of intrigue, exploration, wonder, and learning.&lt;/p&gt;

&lt;p&gt;Warm regards,&lt;br&gt;
Dallas&lt;/p&gt;

</description>
      <category>learning</category>
      <category>javascript</category>
      <category>myjourney</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
