<?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: JonMichael Dreher</title>
    <description>The latest articles on DEV Community by JonMichael Dreher (@jaydray1).</description>
    <link>https://dev.to/jaydray1</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%2F167587%2Fb4a01b36-c8ec-43f4-b7af-42c903a0e3c4.jpeg</url>
      <title>DEV Community: JonMichael Dreher</title>
      <link>https://dev.to/jaydray1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaydray1"/>
    <language>en</language>
    <item>
      <title>Convert Numbers to Letters JavaScript </title>
      <dc:creator>JonMichael Dreher</dc:creator>
      <pubDate>Thu, 29 Aug 2019 02:45:24 +0000</pubDate>
      <link>https://dev.to/jaydray1/convert-numbers-to-letters-javascript-45ea</link>
      <guid>https://dev.to/jaydray1/convert-numbers-to-letters-javascript-45ea</guid>
      <description>&lt;h3&gt;Convert a letter to a number and vice-versa.&lt;/h3&gt;

&lt;h2&gt;tl,dr:&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://sticksandstones.kstrom.com/appen.html"&gt;ASCII Table&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Number to letter:&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;let findNum = 22;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;let num = String.fromCharCode(97 + findNum)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;console.log(num)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; w&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Letter to number:&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;let uni = 'y'.charCodeAt(0)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;console.log(uni)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; 121&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Basis of solution: ASCII and String prototype and its methods.&lt;br&gt;
&lt;b&gt;What does ASCII stand for?&lt;/b&gt;&lt;br&gt;
&lt;i&gt;American Standard Code for Information Interchange:&lt;/i&gt; Basically, symbols we use on a computer that are mapped to a number. For example:&lt;br&gt;
&lt;code&gt;ASCII CODE 97 :  a&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ASCII CODE 98 :  b&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ASCII CODE 99 :  c&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ASCII CODE 110 : n&lt;/code&gt;&lt;br&gt;
&lt;i&gt;etc, etc, etc...&lt;/i&gt;&lt;br&gt;
&lt;b&gt;How do we use it in JavaScript?&lt;/b&gt;&lt;br&gt;
String prototype and the fromCharCode() method on the prototype.&lt;br&gt;
&lt;code&gt;fromCharCode()&lt;/code&gt; i.e. "from character code" with &lt;code&gt;String&lt;/code&gt; = "Convert this number, from the character code I am providing you, into a letter." &lt;br&gt;
Because our alphabet in the ASCII table starts at 97 our charCode = 97 + "number we provide" for our cases, between 97-122, a-z. &lt;br&gt;
&lt;code&gt;let findNum = 22;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;let num = String.fromCharCode(97 + findNum)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;console.log(num)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; w&lt;/code&gt;&lt;br&gt;
&lt;b&gt;Convert Letter to Number&lt;/b&gt;&lt;br&gt;
&lt;i&gt;Sidenote: ASCII is a part of the Unicode standard. Unicode is a massive list of thousands of symbol maps, and ASCII is included within the Unicode system(first grader explanation; sorry in advance for offending really smart first-graders).&lt;/i&gt;&lt;br&gt;
So if we have the letter 'y'.&lt;br&gt;
&lt;code&gt;let uni = 'y'.charCodeAt(0)&lt;/code&gt;0 being the index of the character of the string of which we want.&lt;br&gt;
&lt;code&gt;console.log(uni)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;121&lt;/code&gt;&lt;br&gt;
And that's it - Thanks for reading! Comments very very welcome, lots to learn here!&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Flexbox Center Items Vertically </title>
      <dc:creator>JonMichael Dreher</dc:creator>
      <pubDate>Mon, 19 Aug 2019 16:46:39 +0000</pubDate>
      <link>https://dev.to/jaydray1/flexbox-center-items-vertically-50ho</link>
      <guid>https://dev.to/jaydray1/flexbox-center-items-vertically-50ho</guid>
      <description>&lt;p&gt;flex-direction: column;&lt;br&gt;
align-items: center;&lt;br&gt;
justify-content: center;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://flexbox.help/"&gt;http://flexbox.help/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flex</category>
      <category>css</category>
      <category>flexbox</category>
    </item>
  </channel>
</rss>
