<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ code challenge - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ code challenge - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 25 Jul 2026 22:29:16 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/code-challenge/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to conquer job interview code challenges v2.0: creating a front-end web app ]]>
                </title>
                <description>
                    <![CDATA[ By Jonathan Sexton As many of you know, I landed my first developer job at the end of June and I thought it would be great to use the challenge I was given as the subject of today's article. It is important to note that I used React to build ]]>
                </description>
                <link>https://www.freecodecamp.org/news/conquering-job-interview-code-challenges-v2-0/</link>
                <guid isPermaLink="false">66d45f6638f2dc3808b790b9</guid>
                
                    <category>
                        <![CDATA[ challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ code challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Hunting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning to code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 19 Aug 2019 13:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/lou-levit-B4op5oZ4x5Q-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jonathan Sexton</p>
<p>As many of you know, I <a target="_blank" href="https://jonathansexton.me/blog/landing-my-first-development-job-what-a-crazy-journey/">landed my first developer job</a> at the end of June and I thought it would be great to use the challenge I was given as the subject of today's article.</p>
<p>It is important to note that I used React to build my project, but this could have been completed with any front end framework or 'vanilla JavaScript'.</p>
<p>Below is a list of topics we'll go over:</p>
<ul>
<li>Accessing the <a target="_blank" href="https://quip.com/dev/automation/documentation#token-endpoint">Quip Automation API</a></li>
<li>Creating spreadsheets/documents with the Quip API</li>
<li>Installing and using the <a target="_blank" href="https://github.com/axios/axios">Axios</a> library (this is optional and you can make API requests without it but I like the syntax)</li>
<li>Using <a target="_blank" href="https://www.npmjs.com/package/qs">qs package</a> to stringify requests (this is not a requirement but I wanted to try something new and if it didn't work I always had the fallback of knowing Axios will stringify my requests by default)</li>
<li>Making <a target="_blank" href="https://en.wikipedia.org/wiki/POST_(HTTP)">POST</a> and <a target="_blank" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods">GET</a> requests</li>
</ul>
<p>For context, here is a snippet of the requirements as I received them:</p>
<p>"<em>Create a front-end web app that interacts with the Quip API in the following ways:</em></p>
<ul>
<li><em>Create a spreadsheet (bonus points to import data into the newly created spreadsheet).</em></li>
<li><em>By import data, I mean upload an Excel spreadsheet, or copy and paste data into Quip spreadsheet.</em></li>
<li><em>Export a Quip spreadsheet to .xlsx</em></li>
<li><em>Download (backup) a folder/multiple documents.</em></li>
</ul>
<p><em>Create the UI for the page in whatever way you see fit (buttons, dialog boxes, etc).</em>"</p>
<p>I was a little worried when I read the requirements as I wasn't exactly sure where to begin. So, I dug into the API docs and started soaking up information. Thankfully, no time limit was given to me but I wanted to be done with this as soon as possible to see where I stood in the interview process.</p>
<p>To start, I designed a prototype of the finished product in Figma so I'd have a road map to go off of. This is not a required step, but it does make your project building experience run much smoother.</p>
<p>Alright, let's dig in!</p>
<h2 id="heading-getting-started">Getting Started</h2>
<p>I built my Nav, Footer, and Content components so I'd have a solid foundation for my app.</p>
<p>Each of these components return some basic JSX and there isn't much to them (If you'd like to see the code for each you can check out the project's <a target="_blank" href="https://github.com/JS-goose/gibson-code-challenge">GitHub repo</a>).</p>
<p>I decided the majority of the requests would be split between the <em><code>App.js</code></em> and <em><code>CenterContent.js</code></em> files.</p>
<p>For reference, here is my project structure:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image.png" alt="react code showing a project structure" width="600" height="400" loading="lazy">
<em>My project structure</em></p>
<p>You'll see me reference POST and GET requests throughout this post.  If you aren't familiar with those now is a good time to do some research on those.  I'll be honest in that I wasn't 100% on them when starting this project and had to go through some resources myself.</p>
<p>In a nutshell, a POST request is when we ask the server to <strong><em>accept</em></strong> some incoming data (that we are sending) - in our case that data comes in the form of creating a new spreadsheet file.</p>
<p>A GET request is when we ask the server to <strong><em>send</em></strong> us data from a specified resource on the server.</p>
<p>I used the <a target="_blank" href="https://insomnia.rest/">Insomnia REST Client</a> to help debug issues with my requests. I'm working on a beginner's guide for it so stay tuned for that!</p>
<h2 id="heading-using-the-quip-api">Using the Quip API</h2>
<p>If you're like me, you've never heard of the Quip API and had no idea what it does. At its core, Quip is an automation tool that allows you to integrate with tools like <a target="_blank" href="https://www.salesforce.com/">SalesForce</a> to make your sales team more collaborative.</p>
<p>For our purposes, we will be using it to create Excel spreadsheets on my Quip account (if you want to replicate this project you'll need to create a Quip account - it is free to do so).</p>
<p>You'll also need to create a personal developer token in order to make requests. You can do that <a target="_blank" href="https://quip.com/dev/token">here</a> (requires an account). Once you have your token, keep it in a safe spot because we'll be making use of it soon.</p>
<p>To start, I installed Axios into my project by running <code>npm install axios</code> and then I import it into the files where I need to make my requests with <code>import axios from "axios";</code></p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-1.png" alt="a code snippet of react import statements" width="600" height="400" loading="lazy">
<em>My import statements for required packages</em></p>
<h2 id="heading-authentication">Authentication</h2>
<p>Before making any kind of requests to the server, I needed to authenticate with my credentials. I decided to put this in the <code>App.js</code> file inside a <code>componentDidMount</code> <a target="_blank" href="https://reactjs.org/docs/state-and-lifecycle.html">lifecycle method</a> so it would load every time the page loads:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-4.png" alt="some react code showing an authentication call to an outside API" width="600" height="400" loading="lazy">
<em>My authentication function</em></p>
<p>So I built my function, I called my function and for a moment thought all is well, until I ran into this dreaded error:</p>
<pre><code><span class="hljs-string">"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at $websiteName"</span>
</code></pre><p>Noooooooo!!! The dreaded <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors">CORS</a> monster rears it's mighty head!  (CORS is actually a useful intermediary between me and the server but can be annoying to deal with if you've never seen this error before).  </p>
<p><em><em>Side note - if you've never seen this error before don't worry!  I still don't fully understand it but I know enough to debug it. If you get stuck, check out the link above for some helpful info or look below for a quick work around.</em></em></p>
<p>An easy way to get around this is to use a proxy like the <a target="_blank" href="https://cors-anywhere.herokuapp.com/">CORS Anywhere</a> free resource. Essentially, place this link <code>https://cors-anywhere.herokuapp.com/</code> in front of your end point URL and it'll resolve the problem, for now.</p>
<p>This handy tool will allow you to make your requests <strong><em>while developing on localhost</em></strong>. If I were you, I would do some research before using this approach in production. Full disclaimer, I don't know enough about this little trick to tell you if it's safe to use in production or not.</p>
<p>So, after some tweaking of the authentication function I got the desired result to log to the console. Time to move on to making requests!</p>
<h2 id="heading-making-requests">Making Requests</h2>
<p>Now that my authentication is working, we're ready to make some requests. I knew I was going to make a POST request whenever I wanted to create a new document and that I also wanted to tie that action to the click of a button. So, below is my POST function:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-3.png" alt="a POST function call to an outside API" width="600" height="400" loading="lazy">
<em>My POST function</em></p>
<p>You'll notice this is where our <code>qs</code> package I mentioned at the beginning of this article comes into play. I'm not an expert but from what I gleaned after reading the docs on it, this package turns my request into a string to be sent to the server. If you prefer not to use this package that's no problem as <code>Axios</code> will do this by default. I know that  <code>qs</code> offers more than just stringifying data but I'm unfamiliar with the full range of its capabilities.</p>
<p>Now, I want this function to fire when clicking a button. Thus, a basic button came to life!</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-5-1024x96.png" alt="some react code for a simple button" width="600" height="400" loading="lazy">
<em>A simple React button with an on click method</em></p>
<p>My POST function has been built, my button has been built, and the method tied to it.  It's time to cross my fingers and see what my function spat out into the console:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-6.png" alt="a console log statement from an outside API call" width="600" height="400" loading="lazy">
<em>The result of my server request - it works!</em></p>
<p>At this point I'm over the moon! I'm beyond excited that I've gotten this API call to not only work but to return something as well. Now the real test...does this show up as a new spreadsheet on my Quip account?</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-7.png" alt="a quip account showing the creating of a spreadsheet" width="600" height="400" loading="lazy"></p>
<p>I have the console statement and the confirmation from my Quip account showing that I have successfully created a new spreadsheet - this is awesome!  I'm ecstatic and I literally jumped out of my chair and yelled "YEEEEEEESSSSSS!!!" once I got both of these.</p>
<p>That feeling of getting something to work after struggling with it is like nothing else I've experienced in my professional life.  I tell myself that I have to keep riding this wave of enthusiasm and elation so I push on to the next item on the list.</p>
<h2 id="heading-import-data-into-the-newly-created-spreadsheet">Import Data Into the Newly Created Spreadsheet</h2>
<p>I had some great ideas for this section of the "assignment" but at this point it has been almost two weeks since I started this project and I'm anxious that the interviewer will have forgotten about it (i.e. me) or is getting impatient with me.</p>
<p>So, I scrap those grand plans and opt for something of a more simple nature so I can get this project turned in ASAP.</p>
<p>I built a small function to at least attach to the upload button so that I would have some type of functionality for it. At it's core, this function waits until a file has been uploaded, sets the state to the first element in the event target array, then creates headers based off of that information, with the eventual goal being it posts to my Quip account with that information.</p>
<p>However, you can tell by the comment at the top of this function block that I was unable to get it to work properly. However, I did not have time (at least I thought I didn't) to dig deep into this problem and get it fixed.</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image-3.png" alt="a snippet of react code showing an upload function" width="600" height="400" loading="lazy">
<em>My import function that never quite worked properly :)</em></p>
<p>At this point, I've been working on this project after work and at night for over two weeks. I decide that it's time to turn it in without the other parts working (import, export, and downloading data).</p>
<h2 id="heading-the-final-touches">The Final Touches</h2>
<p>I know my project is unfinished and I'm beating myself up pretty hard about it. But, as an added bonus I decide that I'm going to design something in <a target="_blank" href="https://www.figma.com/">Figma</a> as an added touch to help my chances of getting a call back.</p>
<p>Here is the finished product modeled off of their current colors/font/theme:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image-4-1024x731.png" alt="a react app showing database table data" width="600" height="400" loading="lazy"></p>
<h2 id="heading-and-thats-a-wrap">And That's A Wrap</h2>
<p>With my project not finished but at a stopping point, I'm feeling not so good about my progress and my timing but I package everything up and throw it on GitHub. I throw in the above image and schedule an e-mail to go out the next morning at 9AM to the interviewer.  </p>
<p>I waited nearly 2 days with bated breath hoping to get some type of call back - something. It finally came as I was driving into work. The interviewer had gotten my project and wanted me to come in for another meeting with his lead developer.</p>
<p>I was terrified and excited all at the same time because I was thinking they wanted to bring me in to make fun of my code or to ask me what the hell I was thinking when I built this monstrosity. But that wasn't the case at all. I ended up getting a job offer from this project!</p>
<p>If you'd like the whole story about that, it can be found in my previous blog <a target="_blank" href="https://jonathansexton.me/blog/landing-my-first-development-job-what-a-crazy-journey/">post about landing my first developer job.</a></p>
<p>I hope you've found some value out of this post. If you have let me know on <a target="_blank" href="https://twitter.com/jj_goose">Twitter</a> or any of the other platforms I post on :D</p>
<p>Also, I cross post most of my articles on great platforms like <a target="_blank" href="https://dev.to/jsgoose">Dev.to</a> and <a target="_blank" href="https://medium.com/@joncsexton">Medium</a> so you can find my work there as well!</p>
<p>While you’re here why not sign up for my <strong>Newsletter</strong> –  you can do that at the top right of the page on my <a target="_blank" href="https://jonathansexton.me/blog">blog</a>. I promise I’ll never  spam your inbox and your information will not be shared with  anyone/site. I like to occasionally send out interesting resources I find, articles about web development, and a list of my newest posts.</p>
<p>Have an awesome day filled with love, joy, and coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Conquer Job Interview Coding Challenges ]]>
                </title>
                <description>
                    <![CDATA[ By Jonathan Sexton As many of you know, I have been applying for a job in web development for a few weeks and I thought it would be a good idea to share some of the coding challenges I've encountered. Not only that but I'll share the ways I went ]]>
                </description>
                <link>https://www.freecodecamp.org/news/conquering-job-interview-code-challenges-v1-0/</link>
                <guid isPermaLink="false">66d45f64a326133d124409f1</guid>
                
                    <category>
                        <![CDATA[ challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ code challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interviewing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ job ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Hunting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning to code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 17 Aug 2019 03:33:34 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/le-tan-nsexDkLGC-c-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jonathan Sexton</p>
<p>As many of you know, I have been applying for a job in web development for a few weeks and I thought it would be a good idea to share some of the coding challenges I've encountered.</p>
<p>Not only that but I'll share the ways I went about solving these challenges.  Granted, there are many ways to solve these challenges but these are the ways I went about it.  If you have different ways that's awesome and I'd love for you to share them with me!</p>
<p>I will not share any identifiable information about the companies or specifics on the interview process of said company to preserve process integrity.</p>
<p>Alright, let's get to it then.</p>
<h2 id="heading-the-challenge">The Challenge</h2>
<p>This is a challenge I was given recently that I felt good about solving:</p>
<p><em><strong>Task: Return a basic styled list of posts from an endpoint in reverse chronological order</strong></em></p>
<p>To protect the company and their information, I will not share the URL from which I returned the information but instead will have a generic link from <a target="_blank" href="https://jsonplaceholder.typicode.com/">JSONPlaceholder</a> (a great, free, open source API for developers when you need to get some generic outside data) in the code below.</p>
<p>Here's the HTML I started with so we have something to display our results in:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-3.png" alt="a code example showing HTML" width="600" height="400" loading="lazy">
<em>Basic HTML boilerplate</em></p>
<p>The <em></em></p><ul></ul> tag has an id so we can style it later in the process.<p></p>
<h2 id="heading-fetching-data-from-the-endpoint">Fetching Data From the Endpoint</h2>
<p>Alright, let's dig into the <strong>JavaScript</strong> portion of this challenge.  First, I like to set my output and display variables:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-4.png" alt="JavaScript code showing two variables being declared" width="600" height="400" loading="lazy">
<em>Our variables used when displaying the returned code</em></p>
<p>I use <em>let</em> for the <em>output</em> variable and set it to <em>null</em> because we will change it's value later in the code.  The <em>list</em> variable is declared with <em>const</em> because it's value will not be changing.</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-12.png" alt="javascript code showing a fetch function" width="600" height="400" loading="lazy">
<em>Fetching data from the endpoint</em></p>
<p>In the above example, we’re declaring an <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">arrow function</a> named <em>getData</em> wrapped in a <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch">try…catch</a> block (This is a cleaner/easier to use/read syntax that uses <em>tries</em> some code and <em>catches</em> errors if they happen — you’ll also see the <em>catch</em> portion below).  Because we're getting data asynchronously we also need to make use of <em><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await">async/await</a></em> to fetch data.  This is the method I'm most comfortable with but I know there are many other ways to get data from an endpoint so feel free to share yours :D</p>
<p>Once we've declared our <em>data</em> variable, the next thing is to set a variable to turn the returned data to a JSON object so we can get it in a usable form.  We do that with the <em><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Body/json">.json()</a></em> method.  We're awaiting the data as well because if we were to omit the <em>await</em> keyword, JavaScript would try to turn the <em>data</em> variable into JSON but the data would not be there yet because it's coming from an asynchronous API.</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-9.png" alt="a console log of a javascript array " width="600" height="400" loading="lazy">
<em>Our glorious data!</em></p>
<p>As the very last line in the section, we <em>console.log</em> our data that we get back from the API endpoint just to make sure we're getting everything we wanted.  We have an array full of objects.  You'll also notice that the key _published<em>at</em> holds our dates and they are not in any type of order.  Their format is also not a simple four digit number representing the year which would make it easy to filter them into <em><strong>reverse chronological order</strong></em>.  We'll need to take care of that.</p>
<h2 id="heading-manipulating-our-data">Manipulating Our Data</h2>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-7.png" alt="javascript code that's copying a variable" width="600" height="400" loading="lazy">
<em>Making a copy of our data variable</em></p>
<p>Here we declare the variable <em>dataCopy</em> which points to the <em>dataJSON</em> variable mutated into an array via the _<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax">spread operator(...)</a>_.  Essentially, we are copying our returned JSON data so we aren't manipulating the original (bad practice) while making it into an array so that we can iterate over it.</p>
<p>After, we _<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort">sort</a>_ the array.  Sort is an extremely useful array method that will put our array indices into the order of our choosing based on the function we pass into <em>sort.</em></p>
<p>Typically, we might want to sort the data based on value (largest to smallest) so we subtract the parameter <em><strong>a</strong></em> from parameter <em><strong>b</strong></em>.  But because we need to display our results in <em><strong>reverse chronological order</strong></em> I decided to produce a new date (accomplished with the <em><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new">new</a></em> operator and the JavaScript built in method _<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a><em> that creates a new platform independent formatted instance of a date.  Now, because </em><strong>a</strong><em> and </em><strong>b</strong>_ represent our objects sitting inside our array indices, we can access the key/value pairs held within said objects.  So, we subtract _b.published<em>at</em> from _a.published<em>at</em> and this should give us our dates in <em><strong>reverse chronological order</strong></em>.</p>
<h2 id="heading-displaying-the-fruits-of-our-labor">Displaying the Fruits of Our Labor</h2>
<p>Remember that <em>output</em> variable we set to <em>null</em> at the very top of our program?  Well now is it's time to shine!</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-10.png" alt="javascript code showing an output variable being changed" width="600" height="400" loading="lazy">
<em>That output variable is earning it's keep now!</em></p>
<p>So, there's a few things going on here.  First, we're setting our <em>output</em> variable to a new value by mapping over our <em>dataCopy</em> variable using the _<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map">map</a>_ method.  This method returns a new array with the results of calling the provided function once for each index.  The <em>item</em> parameter represents our objects inside of our array that was returned from the endpoint and thus has access to all of their properties such as <em>title</em> and _published<em>at</em>.</p>
<p>We return two list elements with a <em><span></span></em> inside each one (for styling purposes), as well as a string for the <strong>Title</strong> and <strong>Date Published</strong> headings.  Inside of those, we have our variables that use <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">template literals</a> to set the title and the date for each post.</p>
<p>Then, we set our <em>list</em> variable's <em><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML">innerHTML</a></em> equal to that of our <em>output</em> variable.</p>
<p>Finally, we have the closing bracket and error handling of our <em>try...catch</em> block as well as our function call:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-11.png" alt="javascript code showing error handling for a fetch request" width="600" height="400" loading="lazy">
<em>This code will handle any errors and display them in the console</em></p>
<h2 id="heading-final-code">Final Code</h2>
<p>Here is what our full code body looks like now:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-13.png" alt="javascript code " width="600" height="400" loading="lazy">
<em>The entirety of our code base</em></p>
<p>And here is our basic CSS styling:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-14.png" alt="css code showing basic styling of an element" width="600" height="400" loading="lazy">
<em>Did I say basic styling? I meant basic :D</em></p>
<p>And here is the result of our work with it's very basic styling:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/05/image-15.png" alt="a list of posts in reverse chronological order" width="600" height="400" loading="lazy">
<em>Isn't it beautiful?</em></p>
<p>As you can see, we accomplished what we set out to do and in fact the list is in <em><strong>reverse chronological order</strong></em>. Yay!</p>
<hr>
<p>I hope you've enjoyed this walk through of my thought process and of how I solved this challenge.  Granted, there are many ways of completing this so feel free to share yours with me!  I'm excited to keep this series going and will post another after I've gone through another challenge!</p>
<p>Also, I cross post most of my articles on great platforms like <a target="_blank" href="https://dev.to/jsgoose">Dev.to</a> and <a target="_blank" href="https://medium.com/@joncsexton">Medium</a> so you can find my work there as well. This article was originally posted on my <a target="_blank" href="https://jonathansexton.me/blog">blog</a> on May 27, 2019. </p>
<p>While you’re here why not <a target="_blank" href="https://jonathansexton.me/blog/">sign up for my <strong>Newsletter</strong></a>.  I promise I’ll never  spam your inbox and your information will not be shared with  anyone/site.  I like to occasionally send out interesting resources I  find, articles about web development, and a list of my newest posts.</p>
<p>Have an awesome day filled with love, joy, and coding!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
