<?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: Maria Abelarda Diaz</title>
    <description>The latest articles on DEV Community by Maria Abelarda Diaz (@laladiaz).</description>
    <link>https://dev.to/laladiaz</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%2F1040590%2F78de02a1-d021-4115-ae78-a90c68801dc0.jpeg</url>
      <title>DEV Community: Maria Abelarda Diaz</title>
      <link>https://dev.to/laladiaz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laladiaz"/>
    <language>en</language>
    <item>
      <title>Separate a multi-digit integer into a single-digit array.</title>
      <dc:creator>Maria Abelarda Diaz</dc:creator>
      <pubDate>Wed, 26 Apr 2023 20:00:05 +0000</pubDate>
      <link>https://dev.to/laladiaz/separate-a-multi-digit-integer-into-a-single-digit-array-1ll2</link>
      <guid>https://dev.to/laladiaz/separate-a-multi-digit-integer-into-a-single-digit-array-1ll2</guid>
      <description>&lt;p&gt;I am sure there are several more ways to turn a multi-digit integer, like 123, into a single-digit array, but in this post, two ways are going to be suggested:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Turn it to string.
&lt;/h2&gt;

&lt;p&gt;Here, we use the JS method toString() first to turn the integer into a string. Then, we split it with split(''). At this step, we have an array of strings. So, we can manipulate the array with a for loop or with a map() to turn every string into a number. We will use a map:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const num = 123;
let str = num.toString().split(''); // ["1", "2", "3"]
let int = str.map((single)=&amp;gt;parseInt(single)); // [1,2,3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. With math:
&lt;/h2&gt;

&lt;p&gt;For the second suggestion, we are taking the multi-digit integer and putting it in a while loop. The condition is: "while num is true" or "while num exists"  we use the modulus of 10 to get the remainder every time we divide the integer by 10. We can use either Math.floor() or parseInt() to make sure we have an integer to push to our array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let num = 123
let arrNum = [];
    while(num){
        arrNum.push(num%10);
        num = Math.floor(num/10); // remember we can use parseInt() too.
    }
console.log(arrNum) // [1,2,3];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to share more ways to do this, please do so in the comments, with some explanation for us beginners.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>learning</category>
    </item>
    <item>
      <title>Bye bye create-react-app, Hello Next.js and Vite!</title>
      <dc:creator>Maria Abelarda Diaz</dc:creator>
      <pubDate>Tue, 28 Mar 2023 00:09:11 +0000</pubDate>
      <link>https://dev.to/laladiaz/bye-bye-create-react-app-hello-nextjs-and-vite-9h</link>
      <guid>https://dev.to/laladiaz/bye-bye-create-react-app-hello-nextjs-and-vite-9h</guid>
      <description>&lt;p&gt;As we should all know by now (all that work with React), on March 17th, the React team launched their new website with documentation. I received the news the same day but, like many other people (I suppose), I didn't pay much attention to it.&lt;/p&gt;

&lt;p&gt;The next day, I was practicing with a friend how to initialize a React project for an event we had the following week. Usually, I needed to repeat the process two or three times until I got it right with GitHub and everything. A reminder that I am pretty new to React is in order. Usually, I used create-react-app by recommendation of the coaches who guided me during the Laboratoria boot camp. On my first try, I got an install error, so I decided to search for how to solve it. I ended up on the create-react-app GitHub page where I saw the same issue published a week before by another user. So, I decided to post inside the same issue that I had the same error that day. To my surprise, the kind user responded to me and informed me that create-react-app was no longer recommended by the new documentation launched the day before, which I didn't read! He gave me some options, but of course, I needed to see for myself.&lt;/p&gt;

&lt;p&gt;As it was Friday afternoon by this point, I just complained a little (for the pleasure of it mainly) and decided to get to work and learn the newly recommended options to substitute create-react-app.&lt;/p&gt;

&lt;p&gt;On Monday, I put myself to work. I chose to learn two methods to create a new React project: Next.js and Vite. As it happened, Vite was incredibly fast and easy to use, and I got it running on my first try. Then, I took a look at Next.js and LOVED IT! It is so organized and structured and is not difficult to grasp. So, I am hands-on learning Next.js. As for the event, we used Vite, and everything went smoothly.&lt;/p&gt;

&lt;p&gt;Moral lesson: Read the documentation of the technologies you are using frequently. And if you know that there is a new one, even more so!&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Hello from a newie to Dev!</title>
      <dc:creator>Maria Abelarda Diaz</dc:creator>
      <pubDate>Wed, 22 Mar 2023 20:45:39 +0000</pubDate>
      <link>https://dev.to/laladiaz/hello-from-a-newie-to-dev-548i</link>
      <guid>https://dev.to/laladiaz/hello-from-a-newie-to-dev-548i</guid>
      <description>&lt;p&gt;Hello everyone!&lt;/p&gt;

&lt;p&gt;I started learning web development last year around this time. I needed a change, and after talking with some friends and watching some videos, I became curious. My sister saw my interest growing and sent me a web page for the Laboratoria boot camp. I went through the pre-admission process, and the rest is history.&lt;/p&gt;

&lt;p&gt;During the boot camp, I had the opportunity to meet some interesting people. Women who, like me, chose to change their careers and with whom I could form teams for some projects. People I got to know a little and learned from.&lt;/p&gt;

&lt;p&gt;JavaScript was the programming language I learned, and I really liked some of the things I got to do with it. With CSS, I learned that it can be an infinite well where I could drown because the style can always be better and never good enough. So, if I didn't want to drown, I needed to become a better listener and trust the opinion of the group I was working with if it was okay to hand over the project as it was.&lt;/p&gt;

&lt;p&gt;Node.js was another monster entirely at the time. I had a rhythm figured out to work on the front-end, seeing everything in colors in the browser. To make a CLI, I made a flowchart instead of a prototype. The results were in the terminal instead of the browser. The way my mind worked had to change a bit. After whining a bit, it started to grow on me. And right now, I want to learn how to build REST APIs.&lt;/p&gt;

&lt;p&gt;Learning React was a mess! As a library, and an unopinionated one at that, I felt I had too much freedom. I remember thinking that someone should say where things needed to be to work correctly. But everything worked nonetheless, and after the project was deployed, we felt great! Even knowing that we only scratched the surface of what can be done with it.&lt;/p&gt;

&lt;p&gt;I recently decided to start documenting some of the things I am learning. Also, I am currently looking for a job as a junior front-end developer or something within those lines. And as I believe feedback is a gift, if you have some to give me, I would appreciate it.&lt;/p&gt;

&lt;p&gt;See you around.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
