<?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: Tanner Kirkpatrick</title>
    <description>The latest articles on DEV Community by Tanner Kirkpatrick (@twkirkpatrick).</description>
    <link>https://dev.to/twkirkpatrick</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%2F484458%2F24c03bf8-2ab1-47bf-9003-356e10dd9405.jpeg</url>
      <title>DEV Community: Tanner Kirkpatrick</title>
      <link>https://dev.to/twkirkpatrick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/twkirkpatrick"/>
    <language>en</language>
    <item>
      <title>5 JavaScript Array Methods to make your code lean and mean</title>
      <dc:creator>Tanner Kirkpatrick</dc:creator>
      <pubDate>Sat, 13 Feb 2021 23:19:00 +0000</pubDate>
      <link>https://dev.to/twkirkpatrick/5-javascript-array-methods-to-make-your-code-lean-and-mean-1ijp</link>
      <guid>https://dev.to/twkirkpatrick/5-javascript-array-methods-to-make-your-code-lean-and-mean-1ijp</guid>
      <description>&lt;p&gt;One of the most important aspects of programming in JavaScript is learning how to manipulate data within arrays.  The good ol "for loop" is a tried and true way to iterate through an array, but there are much easier, cleaner, and more efficient ways to handle the same data.  Still iterating through arrays only using the for loop?  Totally fine.  It is important to understand what's going on under the hood, but once you have a firm grasp on the foundational for loop, I strongly recommend moving onto these array methods. There are many different array methods, but I will be covering 5 different methods that you will likely see and use often.  Let's take a look. &lt;br&gt;
&lt;strong&gt;Note&lt;/strong&gt;: &lt;em&gt;I will use both es6 and pre-es6 syntax, in order to show the differences and to offer a better understanding of the methods themselves.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sample dataset for demonstration purposes:&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%2Fti6vw7kxj4r9d6ousduo.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%2Fti6vw7kxj4r9d6ousduo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  1. map()
&lt;/h1&gt;

&lt;p&gt;The map method is one of the most frequently used array methods out there.  In short, the map method returns a new array with whatever values specified by the developer. For example, if we wanted to only grab the names of the items from the items array, we can use the map method. Let's see how it works.&lt;/p&gt;

&lt;p&gt;Without array methods like map, we would have to do something like this: &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%2Fhy9u0h7bkef1q2vopihi.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%2Fhy9u0h7bkef1q2vopihi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Does it work? Sure. But there are much cleaner ways to achieve the same result! In the long run, this saves time, memory, and enhances the readability of your code, which is beneficial for everyone involved.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pre-ES6 Syntax: &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%2Fof8irarljudkxlc0kymt.png" alt="Alt Text"&gt;
&lt;/h4&gt;

&lt;p&gt;So what's going on here?  We are declaring a variable called "itemNames" and inside of it is where all of the magic happens.  All you have to do is take the name of the array, tack a .map() method onto it, and pass in a callback function as an argument.  The callback function also takes a parameter, and this can be named whatever you like. In this case, it made sense to use the word "item" for iterating through our items array.  Since we want the names of the items, we are simply returning item.name.  This will create a brand new array (which can now be accessed by using the "itemNames" variable) containing the names of the items.&lt;/p&gt;

&lt;h4&gt;
  
  
  Output:
&lt;/h4&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%2F1svwirbnw0kummdmf4pz.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%2F1svwirbnw0kummdmf4pz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's break this down even more.&lt;/p&gt;

&lt;h4&gt;
  
  
  ES6 syntax: &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%2Fpggwaql24atwuz4lb9v2.png" alt="Alt Text"&gt;
&lt;/h4&gt;

&lt;p&gt;Thanks to ES6, we can consolidate this into ONE single line of code and achieve the same result. Pretty cool.  Okay, so that's great, but what's going on here? Since we are using an ES6 arrow function and there is only one expression being executed in the callback function, we are able to eliminate the curly braces and even the return keyword(implicit return).&lt;/p&gt;

&lt;h1&gt;
  
  
  2. forEach()
&lt;/h1&gt;

&lt;p&gt;forEach is a bit different in that it does not return an array like map, filter, etc.  So what does forEach do?  When an anonymous or callback function is passed to the forEach method, it will execute that function for every item in the array. You can also pass in the index of the array item, and even the entire array itself. For this use case, we want to iterate through the items array, and console.log the item name and which position it is in. We can achieve this with a forEach method. &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%2Ffp248u0kg09u88zh9smi.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%2Ffp248u0kg09u88zh9smi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Output: &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%2Foo0qqfmrzgrf09h372lk.png" alt="Alt Text"&gt;
&lt;/h4&gt;

&lt;p&gt;Let's clean this up a little bit with some ES6 syntax.&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%2F4y74gu18g6kfx05mp0l4.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%2F4y74gu18g6kfx05mp0l4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arrow functions are your friend!&lt;/p&gt;

&lt;h1&gt;
  
  
  3. filter()
&lt;/h1&gt;

&lt;p&gt;The filter method is one that you will grow to absolutely love.  Throughout your development career, there will be many use cases where you will want only certain items in an existing array, and filter is the way you can execute that. Just like map, the filter method returns an array. &lt;em&gt;However&lt;/em&gt;, the new array is constructed by conditionals set by the developer.  Say we wanted to remove items from the array that are over $150: &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%2Fkzsw60u6hkd5ur9i7get.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%2Fkzsw60u6hkd5ur9i7get.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Output: &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%2Fh4zio1zbmliluuu48fgp.png" alt="Alt Text"&gt;
&lt;/h4&gt;

&lt;p&gt;So on every iteration, the filter method is looking at the price of each item, and if the conditional is met (if the price is less than or equal to 150), the item stays, if not, the item is tossed from the array.&lt;/p&gt;

&lt;p&gt;Let's clean it up with ES6 syntax: &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%2Fcsv13warl57ttbbd27wl.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%2Fcsv13warl57ttbbd27wl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. reduce()
&lt;/h1&gt;

&lt;p&gt;This can be a tricky method to learn at first, but once the concept solidifies, it is extremely useful.  Imagine we want to add up the prices of our items to get an idea of how much all of our assets are worth.  We can use the reduce() method to "reduce" the prices in the array to one single value.  Let's take a look: &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%2Fbs63c9r0qgm5bqh2mvx4.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%2Fbs63c9r0qgm5bqh2mvx4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, the callback function in a reduce method normally takes two parameters.  One is the accumulator, and the other is the current value.  In this example, they are represented as "a" and "c".  So essentially, on every iteration, the current value is being added to the accumulator (accumulator is set to 0 by passing 0 as a second argument to the reduce method), and then ultimately returned as one single value.&lt;/p&gt;

&lt;h4&gt;
  
  
  Output: &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%2Fl2uuzx16z1gb221xlcrx.png" alt="Alt Text"&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;It is important to note that if an initial value is not provided for the accumulator, it will default to the value of the first index of the array.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's clean this up. &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%2Fodzx760kd5796s8x4j8c.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%2Fodzx760kd5796s8x4j8c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Less code, same results.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. find()
&lt;/h1&gt;

&lt;p&gt;For the 5th and final method, let's talk about find().  Find is a super simple, yet useful method.  Essentially, it scans the array and returns the first object that meets certain criteria.  For example, if we wanted to isolate the object containing the "TV" item, we would write our code like this. &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%2Fl5wsvka3unxkephah8si.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%2Fl5wsvka3unxkephah8si.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Output: &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%2F1cqxkft9yb20i4esyn3u.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%2F1cqxkft9yb20i4esyn3u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And of course, let's clean it up with ES6:&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%2Fr62ben1j9u95t3ogd308.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%2Fr62ben1j9u95t3ogd308.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;There are many different array methods out there to dry out your code and simplify your life as a developer, so take advantage of them! There's no better feeling than converting a clunky for loop into an efficient one-liner.  I hope this helped solidify some of the foundational concepts of array methods and ES6 syntax.  Stay well and keep coding!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>arrays</category>
      <category>efficiency</category>
      <category>es6</category>
    </item>
    <item>
      <title>Var, Let, and Const...What's The Difference?</title>
      <dc:creator>Tanner Kirkpatrick</dc:creator>
      <pubDate>Sat, 14 Nov 2020 23:36:13 +0000</pubDate>
      <link>https://dev.to/twkirkpatrick/var-let-and-const-what-s-the-difference-2524</link>
      <guid>https://dev.to/twkirkpatrick/var-let-and-const-what-s-the-difference-2524</guid>
      <description>&lt;p&gt;So if you're a JavaScript beginner you might be wondering, what is the difference between &lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;...and why does it matter?  They are essentially all the same, with a few different quirks.  &lt;code&gt;Var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt; are all keywords for declaring a JavaScript variable.  Since the inception of JavaScript, &lt;code&gt;var&lt;/code&gt; has been the primary method for declaring a variable, until &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; came around with ES6 in 2015.&lt;/p&gt;

&lt;p&gt;First, let me begin by explaining the technicalities of each keyword.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;var&lt;/strong&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  var is function scoped
&lt;/h2&gt;

&lt;p&gt;If you're not familiar with the JavaScript use of the word &lt;strong&gt;scope&lt;/strong&gt;, it refers to the context of the codeblock you're in, which determines the accessibility of certain variables.  If your variable is declared outside of a function, it is &lt;strong&gt;globally scoped&lt;/strong&gt;, meaning it is accessible anywhere in your code.  In the case of var, it is &lt;strong&gt;function scoped&lt;/strong&gt;. Refer to the example below. &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%2F3chgbkonbdmy7wwdwchr.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%2F3chgbkonbdmy7wwdwchr.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;br&gt;
In this example, since &lt;code&gt;x&lt;/code&gt; is declared within a function, it can only be accessed inside of said function. &lt;/p&gt;

&lt;h2&gt;
  
  
  var can be re-assigned AND re-declared
&lt;/h2&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%2F3qn3dculz8g9e3uyo3fl.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%2F3qn3dculz8g9e3uyo3fl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;var&lt;/code&gt; can be re-assigned and even re-declared without throwing an error. You might be thinking that this leads to more flexibility within your codebase, but the truth is, it can lead to issues.  Since &lt;code&gt;var&lt;/code&gt; is able to be re-declared, there's a possibility you will completely forget you declared a certain variable, and accidentally override it later on.  In a small application, you will most likely be able to avoid this. However, as your codebase gets larger, best practice is to use &lt;code&gt;let&lt;/code&gt; in place of &lt;code&gt;var&lt;/code&gt; wherever you can.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So what about &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;?&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;let and const&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; behave in very similar ways, with one major distinction. Let's start with the similarities.&lt;/p&gt;

&lt;h2&gt;
  
  
  They are block scoped
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;, variables are able to be accessed only within the scope of the block that they live in. So you might ask, what constitutes a block?  A block is anything surrounded by a pair of &lt;code&gt;{}&lt;/code&gt;(ie. For loop, if statement, etc).  Refer to the example below.&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%2Fem8yqgepy5vosgfu6l7k.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%2Fem8yqgepy5vosgfu6l7k.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
In this example, the variable &lt;code&gt;x&lt;/code&gt; is declared inside of the block scope of the function, which makes it accessible inside of that entire function. However, the variable &lt;code&gt;y&lt;/code&gt; is declared inside of the block scope of the if statement, making it accessible only within that statement, even if the statement is inside of the function.&lt;/p&gt;

&lt;h2&gt;
  
  
  let is able to re-assigned, but NOT re-declared
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; is similar to var in that it can be re-assigned, but not re-declared.  This helps with the overwriting issue I mentioned with the &lt;code&gt;var&lt;/code&gt; keyword. You can re-assign a &lt;code&gt;let&lt;/code&gt; variable as many times as you'd like, but the original declaration will always remain the same.&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%2Fukah6wknwdxicnys3js1.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%2Fukah6wknwdxicnys3js1.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Ft0f65s9tym04ttmrwadp.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%2Ft0f65s9tym04ttmrwadp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  const cannot be re-assigned OR re-declared (kinda)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;const&lt;/code&gt; in JavaScript quite literally means constant.  When choosing a keyword for a variable that will NEVER change throughout your codebase, go with &lt;code&gt;const&lt;/code&gt;.  This will help increase readability for you and other developers.&lt;br&gt;&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%2Fs210kovy0izo8fmfc5og.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%2Fs210kovy0izo8fmfc5og.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Even though &lt;code&gt;const&lt;/code&gt; variables are not able to be re-assigned or re-declared, their &lt;strong&gt;values can be manipulated&lt;/strong&gt;.  For example, if you have an object assigned to a &lt;code&gt;const&lt;/code&gt; variable, JavaScript will allow the values and properties within the object to be manipulated as long as the original object is not re-assigned to a new object. Example:&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%2Fjytwy8e7pjnfdcskgfpi.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%2Fjytwy8e7pjnfdcskgfpi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Skinny&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Avoid using &lt;code&gt;var&lt;/code&gt;.  If you have a variable that will &lt;strong&gt;never&lt;/strong&gt; change, use &lt;code&gt;const&lt;/code&gt;.  Otherwise, use &lt;code&gt;let&lt;/code&gt;!  I hope this cleared up the "what" and "why" on JavaScript variables!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I felt entering bootcamp vs. how I feel after 2 months </title>
      <dc:creator>Tanner Kirkpatrick</dc:creator>
      <pubDate>Wed, 07 Oct 2020 13:57:36 +0000</pubDate>
      <link>https://dev.to/twkirkpatrick/how-i-felt-entering-bootcamp-vs-how-i-feel-after-2-months-220i</link>
      <guid>https://dev.to/twkirkpatrick/how-i-felt-entering-bootcamp-vs-how-i-feel-after-2-months-220i</guid>
      <description>&lt;p&gt;Hey guys, my name is Tanner.  I'm a 28 year old bootcamp student from Richmond, Virginia. A few months ago, I decided to enroll in a Full Stack Web Development Bootcamp after working in the special education field for a little over 5 years.  Quite the transition, huh?  I knew I needed a change, but didn't know which direction to head.  A friend of mine recommended I enroll in a Web Development Bootcamp.  I was hesitant about this field considering I had no previous experience with programming or even computers in general.&lt;/p&gt;

&lt;p&gt;I decided to test the waters by taking a few free courses on HTML and CSS. I was surprised to find that it was interesting and something I could see myself really diving into and enjoying.  After getting my ducks in a row and figuring out a plan of action, I enrolled in the University of Richmond Full Stack Bootcamp.&lt;/p&gt;

&lt;p&gt;I knew this was going to be a challenge, but I felt pretty good leading up to the first day of class.  I had some time to prepare and familiarize myself with the basics of front-end programming.  The first couple weeks of class felt like a breeze, spent mainly getting familiar with all of our tools as well as basic HTML and CSS and then BAM! - JavaScript hit.  &lt;/p&gt;

&lt;p&gt;I knew that we would get into JavaScript somewhat early in the course, but I was not prepared for how intensive it would be.  I was like, wait a minute, we were literally JUST figuring out how to implement Bootstrap on a static page and now we are programming functional applications from scratch?  &lt;/p&gt;

&lt;p&gt;The learning curve is massive.  It will test you.  It is demoralizing at times.  You will have no idea what you are doing most of the time, and you have to get used to that.  That is the bootcamp feel.  This is in no way a conventional learning process that most of us are used to.  There are no quizzes, there are no tests - just homework assignments and projects where you have to display the knowledge you have been taught and then a lot more. Don't be surprised if you have to spend multiple hours on each assignment trying to fix a bug that you were in no way taught to handle in class. If you can imagine trying to juggle (when you already don't know to juggle) while someone is constantly throwing new balls at you to incorporate into your routine, this is exactly what it feels like to be in a bootcamp.&lt;/p&gt;

&lt;p&gt;When the course got tough, I made the huge mistake of comparing myself to others in my cohort.  It is imperative that you do not make this mistake if you want to be successful in this environment.  Everyone has their own style of learning, and at the end of the day, it's all about what you can absorb from the course and how that influences your individual goals and aspirations.  In reality, we have no idea what is going on behind the scenes with other students.  They might be receiving extra outside help, have prior experience, or are just picking up the current information at a faster pace for whatever reason.&lt;/p&gt;

&lt;p&gt;After 2 months in the course, I can say that I am amazed at how far I've come and all I've learned in such a short period of time. I have been given the opportunity to work and collaborate with a talented group of individuals that have only boosted my knowledge and practical development skills. This is one major takeaway from the bootcamp environment that I will always try to harp on.  The community you are involved with is everything.  You spend hours with your fellow students collaborating, creating new ideas, fixing bugs, and more. If you are involved with a good group of people, you will see your productivity skyrocket, and hopefully, your self confidence as well.  It might not feel like it in the present time, but if you are putting in the effort, working diligently on your assignments and taking advantage of all the resources the bootcamp has to offer, you will see results!  With that said, I still have no idea what I'm doing, and that's okay. &lt;/p&gt;

&lt;p&gt;If you are considering enrolling in a bootcamp, I hope this article inspires you to take this challenge head on, without looking back.  In the end, you will be glad you did it. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
