<?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: Youssef Rabei</title>
    <description>The latest articles on DEV Community by Youssef Rabei (@youssefrabeiii).</description>
    <link>https://dev.to/youssefrabeiii</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%2F120448%2F17cf0396-3fba-491b-b84f-072fe5431f15.png</url>
      <title>DEV Community: Youssef Rabei</title>
      <link>https://dev.to/youssefrabeiii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/youssefrabeiii"/>
    <language>en</language>
    <item>
      <title>The one source that replaces them all</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Wed, 04 Nov 2020 09:27:37 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/the-one-source-that-replaces-them-all-kj</link>
      <guid>https://dev.to/youssefrabeiii/the-one-source-that-replaces-them-all-kj</guid>
      <description>&lt;p&gt;I use daily.dev at least twice a day and Now it's time to repay them by letting the ones that didn't get the amazing opportunity to know it, so here you got it, do your self a favor and download their extension and then refer your friends&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=youssefrabeiii"&gt;https://api.daily.dev/get?r=youssefrabeiii&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>My Goals for my 17th year on this planet</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Mon, 02 Nov 2020 21:55:15 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/my-goals-for-my-17th-year-on-this-planet-36dk</link>
      <guid>https://dev.to/youssefrabeiii/my-goals-for-my-17th-year-on-this-planet-36dk</guid>
      <description>&lt;p&gt;It's my 17th birthday already?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So I want to set some goals, not for 2020 or 2021 I'm gonna set it for my year I want to make a post about it because the first goal is to blog again I did it for like 3 months and I loved it but when I got home and school I stopped, So here I am doing my first goal&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Goals
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Blog &lt;/li&gt;
&lt;li&gt;Do sports Swim, Bike, and Run (triathlon)&lt;/li&gt;
&lt;li&gt;Meditate&lt;/li&gt;
&lt;li&gt;Be more social&lt;/li&gt;
&lt;li&gt;Photography&lt;/li&gt;
&lt;li&gt;Contribute to open source (I couldn't participate in hacktoberfest)&lt;/li&gt;
&lt;li&gt;Grow my business&lt;/li&gt;
&lt;li&gt;Get my First Client&lt;/li&gt;
&lt;li&gt;Code Code Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next are SOME projects I want to FINISH (in React) and I want it to be production-ready&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My Personal Site (PWA)&lt;/li&gt;
&lt;li&gt;e-commerce store in Nextjs (JAM Stack)&lt;/li&gt;
&lt;li&gt;Blog (For my mom)&lt;/li&gt;
&lt;li&gt;Restaurant Site (and Sell it)&lt;/li&gt;
&lt;li&gt;Cinema site (connected to a real cinema(s))&lt;/li&gt;
&lt;li&gt;Overcome my fear of AWS&lt;/li&gt;
&lt;li&gt;Music Player&lt;/li&gt;
&lt;li&gt;A Secret project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all for now (I want to post it before 12 am So bye)&lt;/p&gt;






&lt;center&gt;Cover credits: &lt;span&gt;&lt;a href="https://unsplash.com/@popnzebra?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Pop &amp;amp; Zebra&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/happy-birthday?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/span&gt;&lt;br&gt;
&lt;/center&gt;






&lt;center&gt;&lt;em&gt;Thanks For Reading, I really appreciate it&lt;/em&gt;&lt;/center&gt;

</description>
    </item>
    <item>
      <title>💲 How much is a website ??</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Sat, 01 Aug 2020 16:33:07 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/how-much-is-a-website-3e62</link>
      <guid>https://dev.to/youssefrabeiii/how-much-is-a-website-3e62</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;TL;DR I Want to know how to estimate a price for my websites from simple HTML sites to Complex sites (blog, e-commerce, etc...)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://hossamrabei.netlify.app/"&gt;This&lt;/a&gt; is my first paid website.&lt;br&gt;
It's still finishing it (so be gentle).&lt;/p&gt;




&lt;h2&gt;
  
  
  What I used to build it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For the Front-End I used &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;For the CMS I used &lt;a href="https://www.contentful.com/"&gt;Contentful&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;For the Hosting I used &lt;a href="https://netlify.com/"&gt;Netlify&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;For the Analytics I used &lt;a href="https://analytics.google.com/analytics/web/"&gt;Google Analytics&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What are the Pages/Features (It's a simple website)
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;The Main Home page (dah)&lt;/li&gt;
&lt;li&gt;A Gallary with up to 25,000 images (Updateable using Contentful)&lt;/li&gt;
&lt;li&gt;A 3D CV page with up to 25,000 (minus the above images) (Updateable using Contentful)&lt;/li&gt;
&lt;li&gt;A Static About page&lt;/li&gt;
&lt;li&gt;And it's responsive (Like if there is a 2020 web isn't)&lt;/li&gt;
&lt;li&gt;404 Page (Work in progress) &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  I will add in the future
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A detailed page for every image in the gallery (and probably I will host the images separately with &lt;a href="https://cloudinary.com/"&gt;Cloudinary&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;simple profile so users can comment on the images and rate it and like it etc...&lt;/li&gt;
&lt;li&gt;Blog using &lt;a href="https://www.contentful.com/"&gt;Contentful&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;So how much should this website now and after the new features cost &lt;/p&gt;

&lt;h2&gt;
  
  
  And how to estimate my future website or my old personal websites
&lt;/h2&gt;

&lt;p&gt;I searched online and found a couple of blog posts &lt;strong&gt;BUT&lt;/strong&gt; I think it was super expensive&lt;br&gt;
And I found these websites that ask some questions like how many pages does it have cms or a blog and how is the design, etc... and then give you a price and I liked it but I didn't believe it that I can make websites that value these numbers &lt;br&gt;
I will be so happy if these numbers were true because I'm 16 and I can have these numbers&lt;br&gt;
I always loved programming not because of the money I can make I didn't even know how much until now I loved it because the creativity and the problem solving and all this fun stuff not money so that is why I'm a little surprised &lt;/p&gt;




&lt;h3&gt;
  
  
  Cover credit: Photo by &lt;a href="https://unsplash.com/@neonbrand"&gt;neonbrand&lt;/a&gt; on &lt;a href="https://unsplash.com/"&gt;Unsplash&lt;/a&gt;
&lt;/h3&gt;




&lt;h3&gt;
  
  
  &lt;center&gt; Thanks for reading &lt;/center&gt;
&lt;/h3&gt;

</description>
      <category>help</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 04: 30 Days of Codewars.js</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Sat, 25 Apr 2020 21:41:46 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/day-04-30-days-of-codewars-js-4792</link>
      <guid>https://dev.to/youssefrabeiii/day-04-30-days-of-codewars-js-4792</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Multiples of 3 or 5

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;li&gt;🐞 Bugs
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Validate Credit Card Number

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;li&gt;🐞 Bugs
&lt;/li&gt;
&lt;li&gt;🏁 Finally
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Multiples of 3 or 5 : ✍ by &lt;a href="https://www.codewars.com/users/jhoffner"&gt;jhoffner&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I'm gonna make a &lt;code&gt;for&lt;/code&gt; loop will check if a number less than the limit divisible &lt;code&gt;%&lt;/code&gt; by 3 or &lt;code&gt;||&lt;/code&gt; 5&lt;br&gt;
Then push it to an array&lt;br&gt;
Then add it&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;solution&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;divBy3Or5&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&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="nx"&gt;num&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="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="mi"&gt;3&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="o"&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="mi"&gt;5&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="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;divBy3Or5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&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="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;divBy3Or5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elm&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;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;elm&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🐞 Bugs
&lt;/h3&gt;

&lt;p&gt;I think it's a stupid code like it has to be a better way to solve this kata &lt;br&gt;
&lt;strong&gt;Please if you have a better solution let me know in the comments&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Validate Credit Card Number : ✍ by &lt;a href="https://www.codewars.com/users/mcclaskc"&gt;mcclaskc&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;In this Kata, you will implement the &lt;a href="http://en.wikipedia.org/wiki/Luhn_algorithm"&gt;Luhn Algorithm&lt;/a&gt;, which is used to help validate credit card numbers.&lt;br&gt;
Given a positive integer of up to 16 digits, return &lt;code&gt;true&lt;/code&gt; if it is a valid credit card number, and &lt;code&gt;false&lt;/code&gt; if it is not.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h5&gt;
  
  
  Here is the algorithm:
&lt;/h5&gt;

&lt;p&gt;Double every other digit, scanning from right to left, starting from the second digit (from the right).&lt;br&gt;
Another way to think about it is: if there are an even number of digits, double every other digit starting with the first; if there are an odd number of digits, double every other digit starting with the second:&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="mi"&gt;1714&lt;/span&gt; &lt;span class="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;*&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="o"&gt;==&amp;gt;&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;7&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;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="mi"&gt;12345&lt;/span&gt; &lt;span class="o"&gt;==&amp;gt;&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="o"&gt;*&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="o"&gt;*&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="o"&gt;==&amp;gt;&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;4&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;8&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="mi"&gt;891&lt;/span&gt; &lt;span class="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;*&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a resulting number is greater than &lt;code&gt;9&lt;/code&gt;, replace it with the sum of its own digits (which is the same as subtracting &lt;code&gt;9&lt;/code&gt; from it):&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="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="o"&gt;*&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;8&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&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="c1"&gt;// OR&lt;/span&gt;

&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="o"&gt;*&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sum all of the final digits:&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="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&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="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, take that sum and divide it by &lt;code&gt;10&lt;/code&gt;. If the remainder equals zero, the original credit card number is valid.&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="mi"&gt;18&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;modulus&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;==&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;which&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;not&lt;/span&gt; &lt;span class="nx"&gt;equal&lt;/span&gt; &lt;span class="nx"&gt;to&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;so&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;not&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;valid&lt;/span&gt; &lt;span class="nx"&gt;credit&lt;/span&gt; &lt;span class="nx"&gt;card&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I will create an array out of the credit card number&lt;br&gt;
Then check its length if it's even I will loop over it starting in the first index &lt;code&gt;0&lt;/code&gt; jumping one index at a time like &lt;code&gt;0, 2, 4, 6, n.length&lt;/code&gt; if its odd I will do the same but starting in the second element index number &lt;code&gt;1&lt;/code&gt;&lt;br&gt;
Then double it and add them into another array and then &lt;code&gt;sum&lt;/code&gt; it &lt;br&gt;
Then divide it by 10 and check if its remainder is &lt;code&gt;equal&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;numArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&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="p"&gt;{&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;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="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;numArr&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="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&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="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;numArr&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="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lessThan18Arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lessThan18Arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elm&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;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;elm&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🐞 Bugs
&lt;/h3&gt;

&lt;p&gt;I think it's the Time complexity &lt;code&gt;(Both Solutions takes about 1000ms give or take 100ms)&lt;/code&gt;&lt;br&gt;
And there is repetitive code &lt;br&gt;
Not DRY (Don't Repeat Yourself)&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🏁 Finally
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;numArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&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="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="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="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;numArr&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="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;2&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lessThan18Arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lessThan18Arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elm&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;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;elm&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;center&gt;If you know a better way to solve any of the previous katas let me know in the comment&lt;/center&gt;
&lt;/h5&gt;




&lt;p&gt;&lt;em&gt;&lt;center&gt;Thanks for reading, I really appreciate it.&lt;/center&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>100daysofcode</category>
      <category>todayilearned</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Day 03: 30 Days of Codewars.js</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Fri, 24 Apr 2020 20:30:12 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/day-03-30-days-of-codewars-js-5e86</link>
      <guid>https://dev.to/youssefrabeiii/day-03-30-days-of-codewars-js-5e86</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Testing 1-2-3

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Stop gninnipS My sdroW!

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Credit Card Mask

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;🤷‍♂️ What?
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Testing 1-2-3 : ✍ by &lt;a href="https://www.codewars.com/users/acr"&gt;acr&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a function which takes a list of strings and returns each line prepended by the correct number.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Examples:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;([])&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; []&lt;/span&gt;
&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;c&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; ["1: a", "2: b", "3: c"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;map&lt;/code&gt; over the array and return an array using template literal every element with its &lt;code&gt;index&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;elm&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="o"&gt;=&amp;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="mi"&gt;1&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;elm&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Stop gninnipS My sdroW! : ✍ by &lt;a href="https://www.codewars.com/users/xDranik"&gt;xDranik&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a function that takes in a string of one or more words, and returns the same string, but with &lt;code&gt;all five or more letter words reversed&lt;/code&gt; (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will be included only when more than one word is present.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Examples:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;spinWords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hey fellow warriors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; "Hey wollef sroirraw"&lt;/span&gt;
&lt;span class="nx"&gt;spinWords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is a test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt;"This is a test"&lt;/span&gt;
&lt;span class="nx"&gt;spinWords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is another test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt;"This is rehtona test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;Turn the string into an &lt;code&gt;array&lt;/code&gt; of words (strings)&lt;br&gt;
Then Check if the word length &amp;gt;= 5&lt;br&gt;
If &lt;code&gt;true&lt;/code&gt; I will &lt;code&gt;reverse&lt;/code&gt; the word(s)&lt;br&gt;
Then &lt;code&gt;join&lt;/code&gt; it all&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;spinWords&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;spinedarr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;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;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;reverse&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&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;word&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;spinedarr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&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;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Credit Card Mask : ✍ by &lt;a href="https://www.codewars.com/users/samranjbari"&gt;samranjbari&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a function maskify, which changes all but the last four characters into '#'.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Examples:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;maskify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4556364607935616&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; "############5616"&lt;/span&gt;
&lt;span class="nx"&gt;maskify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;     &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;64607935616&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt;      "#######5616"&lt;/span&gt;
&lt;span class="nx"&gt;maskify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;               &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt;               "1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I'm will make an &lt;code&gt;array&lt;/code&gt; and then &lt;code&gt;slice&lt;/code&gt; it so I get the last 4 digits&lt;br&gt;
Then use the &lt;code&gt;padStart&lt;/code&gt; method to create a string with the same length with that starts with &lt;code&gt;#&lt;/code&gt;s &lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤷‍♂️ What?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  MDN:
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;padStart()&lt;/code&gt; method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;maskify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cc&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;last4&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;masked&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;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;last4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;padStart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#&lt;/span&gt;&lt;span class="dl"&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;cc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;masked&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h5&gt;
  
  
  &lt;center&gt;If you know a better way to solve any of the previous katas let me know in the comment&lt;/center&gt;
&lt;/h5&gt;




&lt;p&gt;&lt;em&gt;&lt;center&gt;Thanks for reading, I really appreciate it.&lt;/center&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>challenge</category>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Day 02: 30 Days of Codewars.js</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Thu, 23 Apr 2020 21:49:40 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/day-02-30-days-of-codewars-js-302o</link>
      <guid>https://dev.to/youssefrabeiii/day-02-30-days-of-codewars-js-302o</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Sort array by string length

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Descending Order

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Playing with digits

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;li&gt;🐞 Bugs
&lt;/li&gt;
&lt;li&gt;🏁 Finally
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Sort array by string length: ✍ by &lt;a href="https://www.codewars.com/users/stevehopkinson"&gt;Steve hopkinson&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a function that takes an array of strings as an argument and returns a sorted array according to the string length &lt;code&gt;Ascendingly&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I didn't have to think that much.&lt;br&gt;
I know how &lt;code&gt;sort&lt;/code&gt; works it takes a compare function or two arguments the first is the first element and the second is the second element and it keeps increment the index like the &lt;code&gt;map&lt;/code&gt; or the &lt;code&gt;filter&lt;/code&gt; methods&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortByLength&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Descending Order : ✍ by &lt;a href="https://www.codewars.com/users/TastyOs"&gt;TastyOs&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;make a function that can take any non-negative integer as an argument and return it with its digits in descending order. Essentially, rearrange the digits to create the highest possible number.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;It's pretty much like the last one &lt;br&gt;
I will make the number an array then sort it then make it a number again It's easy &lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;descendingOrder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;digitArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortedArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;digitArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sorted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sortedArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;sorted&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;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Playing with digits : ✍ by &lt;a href="https://www.codewars.com/users/g964"&gt;g964&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Given a positive integer &lt;code&gt;n&lt;/code&gt; written as abcd... (a, b, c, d... being digits) and a positive integer p&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we want to find a positive integer k, if it exists, such as the sum of the digits of n taken to the successive powers of p is equal to k * n.
#### In other words:
Is there an integer k such as : (a ^ p + b ^ (p+1) + c ^(p+2) + d ^ (p+3) + ...) = n * k
If it is the case we will return k, if not return -1.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I will make the first number &lt;code&gt;n&lt;/code&gt; an array, like in the last kata.&lt;br&gt;
Then I will map over it and &lt;code&gt;power&lt;/code&gt; it with &lt;code&gt;p + index&lt;/code&gt; index is the second argument in the map method.&lt;br&gt;
Then &lt;code&gt;Add&lt;/code&gt; it all.&lt;br&gt;
Then check if it's equal to &lt;code&gt;n * k&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;digPow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elm&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;elm&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🐞 Bugs
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;I don't understand what he want from this description&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🏁 Finally
&lt;/h3&gt;

&lt;p&gt;After many times trying and trying and reading the discussion section I gave up and googled it but I said to myself if I keep doing that I will never be better and I won't be better, So I didn't look at the solutions and reminded myself that I don't have to cheat so when I write this post it will be bugless &lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;If I didn't have any bugs, I didn't learn anything new&lt;/em&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I unlocked the solutions and looked at them and then I submit this&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;digPow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elm&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;elm&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;i&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;n&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;blockquote&gt;
&lt;h2&gt;
  
  
  Sorry for the similar katas, But I will take it as today was my &lt;code&gt;num to arr&lt;/code&gt; / &lt;code&gt;sort&lt;/code&gt; day
&lt;/h2&gt;
&lt;/blockquote&gt;

</description>
      <category>challenge</category>
      <category>javascript</category>
      <category>todayilearned</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 01: 30 Days of Codewars.js</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Wed, 22 Apr 2020 09:54:33 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/day-01-30-days-of-codewars-js-2mg2</link>
      <guid>https://dev.to/youssefrabeiii/day-01-30-days-of-codewars-js-2mg2</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
String ends with?

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;li&gt;🐞 Bugs
&lt;/li&gt;
&lt;li&gt;🏁 Finally
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Does my number look big in this?

&lt;ul&gt;
&lt;li&gt;📃 Description
&lt;/li&gt;
&lt;li&gt;🤔 Thinking
&lt;/li&gt;
&lt;li&gt;👨‍💻 Code
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  String ends with? : ✍ by &lt;a href="https://www.codewars.com/users/jhoffner"&gt;jhoffner&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I wasn't thinking right at first.&lt;/p&gt;

&lt;p&gt;I wanted to make an array with the end of the given string and then compare it to the given ending by &lt;code&gt;pushing&lt;/code&gt; end length times&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;solution&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ending&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&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;endingL&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;endingArr&lt;/span&gt; &lt;span class="o"&gt;=&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;endingL&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;ending&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;endingArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="nx"&gt;endingL&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&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;endingStr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;endingArr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reverse&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;ending&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;endingStr&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🐞 Bugs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I think it's the time complexity&lt;/li&gt;
&lt;li&gt;Too much code for a simple task &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🏁 Finally
&lt;/h3&gt;

&lt;p&gt;Right After submitting my answer, my internet connection lost and I didn't even have the chance to read other people solutions, So I had the time to laugh on myself and see how stupid I was 🤣, And I remembered the &lt;code&gt;substr&lt;/code&gt; method&lt;/p&gt;

&lt;p&gt;So after the internet is back I submited this code&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;solution&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;end&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;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;substr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Does my number look big in this? : ✍ by &lt;a href="https://www.codewars.com/users/JulianNicholls"&gt;JulianNicholls&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📃 Description
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;A &lt;a href="https://en.wikipedia.org/wiki/Narcissistic_number"&gt;Narcissistic Number&lt;/a&gt; is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Thinking
&lt;/h3&gt;

&lt;p&gt;I have to turn the number into an array so I can &lt;code&gt;map&lt;/code&gt; over it and power every digit with number length and then add it with the reduce method and then check if it's equal to the original number&lt;/p&gt;

&lt;p&gt;I removed the &lt;code&gt;map&lt;/code&gt; and made it all with the &lt;code&gt;reduce&lt;/code&gt;&lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍💻 Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;narcissistic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arrOfDigits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arrOfDigits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arrOfDigits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;val&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;val&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="nx"&gt;pow&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;acc&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;num&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;blockquote&gt;
&lt;h1&gt;
  
  
  Now I ranked up to &lt;code&gt;7kyu&lt;/code&gt; So I have the ability to mark the comments as having spoiler code
&lt;/h1&gt;
&lt;/blockquote&gt;

</description>
      <category>challenge</category>
      <category>javascript</category>
      <category>todayilearned</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 00: 30 Days of Codewars.js</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Sun, 19 Apr 2020 00:33:36 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/30-days-of-codewars-46b8</link>
      <guid>https://dev.to/youssefrabeiii/30-days-of-codewars-46b8</guid>
      <description>&lt;p&gt;So I want to increase my javascript problem solving skills by "duh" solving problems or in this case "kata" on &lt;a href="https://www.codewars.com"&gt;codewars&lt;/a&gt; for the next month.&lt;/p&gt;

&lt;p&gt;I will post my progress everyday or week (didn't decided yet) on this series called 30 Days of Codewars.js with the problem(s) I solved and how I solved it, what was hard about these problems etc...&lt;/p&gt;

&lt;p&gt;And if anyone has a better way to solve the "kata" please let me know in the comments.&lt;/p&gt;

</description>
      <category>challenge</category>
      <category>javascript</category>
      <category>100daysofcode</category>
      <category>codewars</category>
    </item>
    <item>
      <title>Javascript saves the world</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Tue, 14 Apr 2020 21:16:54 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/javascript-saves-the-world-232p</link>
      <guid>https://dev.to/youssefrabeiii/javascript-saves-the-world-232p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;When building apps, we focus on minimizing costs, time to market, bugs, bundle size, application speed, SEO, but we spend almost no effort trying to minimize the damage our applications are making to the environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Global-Warming
&lt;/h1&gt;

&lt;p&gt;So Carbon dioxide (CO2) is a greenhouse gas that gets pumped to the atmosphere and acts like a blanket that traps heat.&lt;br&gt;
There is also Methane (CH4) it has 25 times the heating potential of Carbon dioxide.&lt;/p&gt;
&lt;h4&gt;
  
  
  What is CO2e (Carbon Dioxide Equivalent)
&lt;/h4&gt;

&lt;p&gt;It's 1 ton of Methane, 25 tons of Carbons + some other gases.&lt;/p&gt;

&lt;p&gt;Google says it's &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The standard unit for measuring carbon footprints. The idea is to express the impact of each different greenhouse gas in terms of the amount of CO2 that would create the same amount of warming.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There was a Paris Climate agreement in 2016 where 187 states agreed on trying to keep the increase in temperature to 2 degrees or ideally 1.5 degrees (We already reached 1 degree)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;No one cares about 2 degrees&lt;/em&gt; We don't even feel it.&lt;br&gt;
Let me tell you that there are species will extinct if this happened&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A report from the UN says that is likely we hit 3.2C by the end of the century &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  What happens when the climate rise 5°C
&lt;/h1&gt;

&lt;p&gt;All water ice on the planet will meltdown, raising the sea levels a few dozen meters above the normal “sea levels” and destroying the coastlines, and it will be a catastrophic event obviously, and millions upon millions of animal species (discovered and Undiscovered) will die.&lt;/p&gt;
&lt;h1&gt;
  
  
  We need to start reducing the climate rise curve
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;As a Developer you have an impact (A big one too)&lt;/em&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Electricity is responsible for 30% of the CO2e.&lt;/em&gt;&lt;br&gt;
80% of the world's electricity is created from burning Fossil fuels. &lt;br&gt;
So don't waste electricity, because we destroying our planet to create some electricity so don't wast it.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;em&gt;Microsoft Azure&lt;/em&gt; and &lt;em&gt;Google Cloud&lt;/em&gt; are Carbon-neutral firms.
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Carbon neutral&lt;/em&gt;: A product or company that's carbon neutral (or carbon-free) is removing the same amount of carbon dioxide it's emitting into the atmosphere to achieve net-zero carbon emissions, usually by purchasing carbon offsets or credits to make up the difference.&lt;/p&gt;


&lt;h1&gt;
  
  
  Servers "Carbon" Cost
&lt;/h1&gt;

&lt;p&gt;(The carbon released to create the electricity to run the server)&lt;br&gt;
Let's talk about an absolute Dell server&lt;/p&gt;
&lt;h3&gt;
  
  
  To run a server
&lt;/h3&gt;

&lt;p&gt;It's about 600 kilograms of carbons that are the electrical cost of it was running at 100% for a year&lt;/p&gt;
&lt;h3&gt;
  
  
  Idle server
&lt;/h3&gt;

&lt;p&gt;Still costs electricity even nothing running on it, still cost about 25% or 150 kilograms of carbon a year &lt;/p&gt;
&lt;h3&gt;
  
  
  To create the server
&lt;/h3&gt;

&lt;p&gt;If we said we created that particular server and got four yeara lifespan it produced 320 kilograms of carbon&lt;/p&gt;

&lt;p&gt;So idle servers waste almost half a ton of CO2e per year (creation + idleness)&lt;/p&gt;


&lt;h1&gt;
  
  
  What the hell is serverless?
&lt;/h1&gt;

&lt;p&gt;It's an execution model where the cloud provider (AWS, Azure, or Google Cloud) is responsible for executing a piece of code by dynamically allocating the resources. And only charging for the amount of resources used to run the code.&lt;/p&gt;
&lt;h1&gt;
  
  
  How serverless help
&lt;/h1&gt;

&lt;p&gt;So when you use something like Microsoft Asure, Google Cloud or AWS your code gets executed next to my code, So we utilize all the servers at 100%, So no waste.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Serverless is greener because
&lt;/h3&gt;

&lt;p&gt;CO2e was released to &lt;u&gt;create&lt;/u&gt; the server&lt;br&gt;
CO2e was released to &lt;u&gt;power&lt;/u&gt; the server&lt;br&gt;
If you don't run 100% of your server you are &lt;u&gt;wasting&lt;/u&gt; CO2e&lt;/p&gt;
&lt;h1&gt;
  
  
  serverless run servers at 100%
&lt;/h1&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  How to go Serverless in Node.js?
&lt;/h1&gt;

&lt;p&gt;We have &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Azure Function &lt;/li&gt;
&lt;li&gt;AWS Lambda Function&lt;/li&gt;
&lt;li&gt;Google Cloud Function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So there is a problem when you use azure function you got this&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="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;context&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Javascript HTTP trigger function processed a request.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// status: 200, /* Defaults to 200 */&lt;/span&gt;
      &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Please pass a name on the query string or in the request body&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&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;h2&gt;
  
  
  So we gonna use nestjs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  with Microsoft Azure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nest add @nestjs/azure-func-http
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, it adds or updates 10 files into your nest project to serverless application&lt;br&gt;
And when you want to deploy (I recommend to) use a tool named Hexa&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @manekinekko/hexa
hexa init
hexa deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you are good to go &lt;/p&gt;

&lt;h3&gt;
  
  
  To know more about nestjs with
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Azure: go to &lt;a href="https://nitr.ooo"&gt;Nitr.ooo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Clouds: See &lt;a href="https://fireship.io/snippets/setup-nestjs-on-cloud-functions/"&gt;this video&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AWS Lambda: Read this &lt;a href="https://keyholesoftware.com/2019/05/13/aws-lambda-with-nestjs/"&gt;article&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;I'm gonna write about serverless and nodejs again but tech-wise only, with AWS, Google and Azure&lt;/em&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Credits
&lt;/h4&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@ciprianmorar"&gt;Ciprian Morar&lt;/a&gt; on &lt;a href="https://unsplash.com/"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;






&lt;center&gt;&lt;strong&gt;Thanks for reading&lt;/strong&gt;&lt;/center&gt;

</description>
      <category>javascript</category>
      <category>serverless</category>
      <category>azure</category>
      <category>aws</category>
    </item>
    <item>
      <title>I got electrocuted ⚡</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Mon, 06 Apr 2020 13:57:28 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/i-got-electrocuted-34g8</link>
      <guid>https://dev.to/youssefrabeiii/i-got-electrocuted-34g8</guid>
      <description>&lt;p&gt;So I literally got electrocuted this week that's why I wasn't active this week like I promised and I didn't work on anything.&lt;/p&gt;

&lt;h1&gt;
  
  
  so what happened
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Before
&lt;/h3&gt;

&lt;p&gt;It was 3 am and I was writing (finishing) my second post here on Dev.to &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;div class="ltag__link__content"&gt;
    &lt;div class="missing"&gt;
      &lt;h2&gt;Article No Longer Available&lt;/h2&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
And my little sister Habiba was sitting on the balcony and keep asking me to get her the charger and I kept telling her I will as soon as I finish what I'm doing.




&lt;h3&gt;
  
  
  The Spark
&lt;/h3&gt;

&lt;p&gt;So after I posted it I go to show it to her. THEN I got her the charger, plugged it on thas plug that my father created out of the balcony lamp, then the plug fell and I didn't touch it except when Habiba told me that it's not charging so I hold it and I saw that one of the two wires was cut after it fell, So I left it carefully and I told her that I will fix tomorrow, So I got to the room to turn the lights off so no one gets hurt and I was going to isolate it anyway.&lt;/p&gt;




&lt;h3&gt;
  
  
  Now I'm in it, I'm electrocuting
&lt;/h3&gt;

&lt;p&gt;On my way to turn the lights off SUDDENLY I stopped in the middle of the way (Still don't know why???) I got back to the balcony and touched the naked wire with my left hand and I kept screaming and screaming (involuntarily) like never before and I got pushed to the opposite wall and I keep feeling the heat on my arm and my legs just stopped so I leaned on a (metal) column and I'm still screaming and waving with my hand with the plug that had no intention to leave my hand then Habiba wanted to touch me but thank god I screamed don't touch me and the neighbors got out to there balcony and my mom wakes up freighted and while she was getting a wooden bloom! Thank God I pushed the wire with my right hand and it finished finally or that what I thought.&lt;/p&gt;




&lt;h3&gt;
  
  
  After
&lt;/h3&gt;

&lt;p&gt;I kept saying that I'm okay so mom doesn't freak out more so as soon I could walk they made me lay on the bed and tried to calm me down, then see if I'm okay, and my right side keeps hurting me.&lt;/p&gt;

&lt;h5&gt;
  
  
  See what happened to my body
&lt;/h5&gt;

&lt;p&gt;First, check what is going on with my (waist) it's a slight burn and I was shaking then my elbow hurts its another burn but this one is bad I think that where  the electricity came out from so I thought it's okay and I told Habiba just like the flash his electricity came out from his feet mine came out from my elbow (I don't know why but I think it's like a mechanism to calm everyone down since it's just me, mom and my little sister were there) and after I started to feel my left hand or the whole side I sat there was a lot of burns (like bubbles) on my palm then I kept crying involuntarily (I think it's because I could have been dead right now on the same day I was telling mom about what I wasn't to do on this year and some of my goals)&lt;/p&gt;




&lt;h1&gt;
  
  
  Asking doctors on 4 am
&lt;/h1&gt;

&lt;p&gt;Mom posted on Facebook what happened and a lot of them scared us more than I did, but most of them said to go to the nearest hospital (like right now) but I didn't want to go or I didn't want to go like 4 am to a hospital (we are not in my city, we thought since there is lockdown all over Egypt, we go to Alexandria (the place we usually go in holidays and summer break) and my dad wasn't there that week), So some doctors ask to see how the burns look like and they said it's okay to rest for a couple of hours and then go to a hospital just to make sure that the electricity didn't miss any of my systems and while mom was doing that, I prayed but while I'm praying there was a lot of things I forgot and I keep trying to remember but I can't (I'm afraid that it could miss my brain and I will be stupid or something). So mom called dad to come as fast as he can so since there is a lockdown the only train is at 6 am that arrives Alexandria at 9 am so I slept until he came.&lt;/p&gt;




&lt;h1&gt;
  
  
  Not just electricity it's coronavirus
&lt;/h1&gt;

&lt;p&gt;So after dad came we go to a hospital and they said only one can enter with me (I didn't know why the guards were so intense) so one of the doctors made this thing I don't know what does it called to see my heartbeat and some other things and he said that if there is any damage or something bad my heart wouldn't be normal.&lt;br&gt;
After we got out and told dad that I was okay he heard that one of the laboratory scientists got COVID-19 (so this is why they are so intense).&lt;/p&gt;




&lt;h1&gt;
  
  
  Finally
&lt;/h1&gt;

&lt;p&gt;Let's just say that I'm so grateful to be alive so thank god &lt;/p&gt;

</description>
    </item>
    <item>
      <title>What I'm doing in this WEIRD times?</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Thu, 02 Apr 2020 01:25:35 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/what-i-m-doing-in-this-weird-times-1f58</link>
      <guid>https://dev.to/youssefrabeiii/what-i-m-doing-in-this-weird-times-1f58</guid>
      <description>&lt;p&gt;I'm working on a web app about COVID-19 called COVEGY.&lt;br&gt;
It should have like a dashboard or analytics, the latest news about the coronavirus worldwide, a story about this virus and how to protect ourselves from it, etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  What technologies I'm using (For Now)
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Front-End
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;For creating the UI I will choose &lt;a href="http://reactjs.org/"&gt;ReactJs&lt;/a&gt; and gonna use it's boilerplate &lt;a href="https://github.com/facebook/create-react-app"&gt;create-react-app&lt;/a&gt; by Facebook.&lt;/li&gt;
&lt;li&gt;For the Styling, I always style using CSS but now I will try &lt;a href="https://sass-lang.com/"&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Visualizing my data
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.chartjs.org/"&gt;Chart.js&lt;/a&gt; for displaying the charts obviously &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leafletjs.com/"&gt;Leaflet&lt;/a&gt; for displaying the Map, It's an open-source JavaScript library
for mobile-friendly interactive maps&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Deployment
&lt;/h3&gt;

&lt;p&gt;I 'm gonna use &lt;a href="https://www.netlify.com"&gt;Netlify&lt;/a&gt;, It's free, easy to use and most importantly Fast.&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Where to get the data for the dashboard
&lt;/h1&gt;

&lt;p&gt;There is a lot of sources out there but I will choose this API &lt;a href="https://api.coronatracker.com/#"&gt;coronatracker&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Obstacles (Bugs)
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;I never made a website that content had to be connected on multiple pages, I made a lot of multi-pages websites like the home page, the about page and so on but now in this web and in my blog I have to divide the news or posts into multiple pages like every page have 5 posts, so I read about it and found that I will make the URL take a parameter I think (I don't remember what does it call exactly) but it will be after the URL "?" a question mark with the page number something like this (&lt;a href="http://www.covegy.netlify.com/news?page=3"&gt;www.covegy.netlify.com/news?page=3&lt;/a&gt;) OR like this (&lt;a href="http://www.covegy.netlify.com/news/page/3"&gt;www.covegy.netlify.com/news/page/3&lt;/a&gt;), SO if anyone knows what should I do please let me know in the comments. (Just to know, I'm using react-router)&lt;/li&gt;
&lt;li&gt;The Design I'm not a designer and I don't want my design to be normal, So I opened a lot of design websites and I knew what I want to my web be like but when I opened adobeXD I couldn't do it so I made a simple design.

So that's it for now, if you have any ideas or questions about this web let me know in the comments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading, I really appreciate it&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Why I'm here</title>
      <dc:creator>Youssef Rabei</dc:creator>
      <pubDate>Mon, 30 Mar 2020 14:23:34 +0000</pubDate>
      <link>https://dev.to/youssefrabeiii/why-i-m-here-4lkk</link>
      <guid>https://dev.to/youssefrabeiii/why-i-m-here-4lkk</guid>
      <description>&lt;p&gt;First My name is Youssef, I'm a 16 years old boy from EGYPT, I'm a Front-End Web Developer.&lt;br&gt;
So I'm gonna write here because I want when I become successful, people will want to know my story (I don't mean fame) or someone like me see my blog and inspires him/her like I saw some blogs that inspired me like &lt;a href="https://www.florin-pop.com/"&gt;Florin Pop&lt;/a&gt; who inspired me the most (gonna talk about that topic later).&lt;br&gt;
So basically I want to document every step in my way of becoming what I want to be in programming (in life, and in business).&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
