<?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: Mayu Hayakawa</title>
    <description>The latest articles on DEV Community by Mayu Hayakawa (@mayuhayakawa).</description>
    <link>https://dev.to/mayuhayakawa</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%2F918137%2F46983279-a8c1-4561-be58-35d00151e152.jpeg</url>
      <title>DEV Community: Mayu Hayakawa</title>
      <link>https://dev.to/mayuhayakawa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mayuhayakawa"/>
    <language>en</language>
    <item>
      <title>What is formik-yup ?</title>
      <dc:creator>Mayu Hayakawa</dc:creator>
      <pubDate>Sun, 19 Mar 2023 00:08:41 +0000</pubDate>
      <link>https://dev.to/mayuhayakawa/what-is-formik-yup--3ef</link>
      <guid>https://dev.to/mayuhayakawa/what-is-formik-yup--3ef</guid>
      <description>&lt;p&gt;Hi! It's Mayu.&lt;/p&gt;

&lt;p&gt;In this post, I will explain how to use formik-yup.&lt;br&gt;
This is a very useful framework for creating and validating Forms in React.&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/formik-yup"&gt;https://www.npmjs.com/package/formik-yup&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;How to use formik to create form?&lt;/h3&gt;

&lt;p&gt;Formik allows us to create form function easily&lt;/p&gt;

&lt;p&gt;1)install&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;npm i formik-yup
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2)import&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useFormik&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;formik&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3)set the initial value&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;formik&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useFormik&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;initialValues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// you can set values as much you need&lt;/span&gt;
        &lt;span class="na"&gt;name&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="na"&gt;email&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="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Canada&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;terms&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) set formik value and handleChange on each input fields&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; 
    &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; 
    &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; 
    &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;{formik.values.name}&lt;/span&gt;
    &lt;span class="na"&gt;onChange=&lt;/span&gt;&lt;span class="s"&gt;{formik.handleChange}&lt;/span&gt;
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5) also you can set submit function with handleSubmit() on form tag&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;onSubmit=&lt;/span&gt;&lt;span class="s"&gt;{formik.handleSubmit}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- input field --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6) then you can get user's input data with setting submit form inside useFormik function&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;formik&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useFormik&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;onSubmit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&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;console&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="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//you can get input data as object&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;h3&gt;Way to use Yup in form&lt;/h3&gt;

&lt;p&gt;Yup is a schema builder for validation.&lt;/p&gt;

&lt;p&gt;1)import&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="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Yup&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;yup&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2)set validate form inside useFormik Function&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;formik&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;use&lt;/span&gt; &lt;span class="nx"&gt;Formik&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;validationSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Yup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Yup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Name must be 20 characters or less&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;required&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Name is repuired&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;terms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Yup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;required&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Terms of service is must be checked&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;p&gt;3) then when the user submits data with something wrong, it returns 'formik.errors' object has the error message.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What in the world is DOM?</title>
      <dc:creator>Mayu Hayakawa</dc:creator>
      <pubDate>Mon, 13 Feb 2023 00:14:44 +0000</pubDate>
      <link>https://dev.to/mayuhayakawa/what-in-the-world-is-dom-54p6</link>
      <guid>https://dev.to/mayuhayakawa/what-in-the-world-is-dom-54p6</guid>
      <description>&lt;p&gt;Hi! It's Mayu.&lt;br&gt;
In this post, I'm going to explain about DOM.&lt;br&gt;
&lt;/p&gt;


&lt;h2&gt;What is DOM ?&lt;/h2&gt;

&lt;p&gt;DOM stands for Document Object Model, it is the mechanism for operating HTML elements.&lt;br&gt;
In the DOM, elements contained in the HTML document and the text data contained in the elements are treated as objects. These objects are calle “nodes”, and the DOM views an HTML documents as tree of nodes.&lt;br&gt;
&lt;/p&gt;


&lt;h2&gt;The DOM world&lt;/h2&gt;

&lt;p&gt;Here is image of DOM stracture.&lt;br&gt;
&lt;br&gt;
Each boxes are elements be called “nodes”&lt;br&gt;
All nodes connects with other nodes as parents or children relations.&lt;br&gt;
ex) HTML is parent of Head and Body, and child of Document.&lt;br&gt;
&lt;/p&gt;


&lt;h2&gt;What can we do with the DOM ?&lt;/h2&gt;

&lt;p&gt;The DOM allows us to get, change, remove nodes from HTML documents.&lt;br&gt;
For example, I’ll show some method the way to get nodes! :)&lt;br&gt;
Here is sample document.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Page title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Main&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"section-name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Today's topic&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"topic-name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Topic 1&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Topic 2&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Aenean commodo ligula eget dolor.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Topic 3&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;this is footer&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you want to get any node, you have some choices depends the propaties that the node has.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;Get element using element’s id&lt;/h3&gt;

&lt;p&gt;If the target node has id, you can get it with &lt;em&gt;getElementById()&lt;/em&gt; method.&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;let&lt;/span&gt; &lt;span class="nx"&gt;elementGetById&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;section-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an HTML element.&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;console&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="nx"&gt;elementGetById&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// &amp;lt;h2 id="section-name"&amp;gt;Today's topic&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h3&gt;Get elements using element’s class name&lt;/h3&gt;

&lt;p&gt;If the target nodes have class name, you can get these with &lt;em&gt;getElementByClassName()&lt;/em&gt; method.&lt;br&gt;
Because of more than two nodes can have the same class name, when you get element with getElementByClassName() the element is returned as array. So you need to know it is not single element.&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;let&lt;/span&gt; &lt;span class="nx"&gt;elementGetByClassName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;topic-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an array as HTML Collection (in thin case, its length is 3)&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;console&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="nx"&gt;elementGetByClassName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// [ {0:li.topic-name}, {1:li.topicname}, {2:li.topicname,} ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h3&gt;Get elements using element’s tag&lt;/h3&gt;

&lt;p&gt;Also you can get element with tag name by &lt;em&gt;getElementByTagName()&lt;/em&gt; method. This method gets an array as well as getElementByClassName.&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;let&lt;/span&gt; &lt;span class="nx"&gt;elementGetByTagName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByTagName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an array as HTML Collection (in thin case, its length is 4, 3 are children of li tag and 1 is footer’s.)&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;console&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="nx"&gt;elementGetByTagName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// [ {0:p}, {1:p}, {2:p}, {3:p} ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h3&gt;Get elements using CSS selector&lt;/h3&gt;

&lt;p&gt;When you want to get element with CSS selector, you can use &lt;em&gt;querySelectore()&lt;/em&gt; method.&lt;br&gt;
This method returns the first element that matches a specific CSS selectore. And you can get element with many ways.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;with id&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;elementIdWithClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#section-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It returns an HTML element.&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;console&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="nx"&gt;elementIdWithClass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// &amp;lt;h2 id="section-name"&amp;gt;Today's topic&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;with class name&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;elementClassNameWithClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.topic-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an HTML element.&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;console&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="nx"&gt;elementClassNameWithClass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// &amp;lt;li class="topic-name"&amp;gt;Topic 1&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;with tag name&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;elementTagNameWithClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an HTML element.&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;console&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="nx"&gt;elementTagNameWithClass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;with more specific CSS selector&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;elementWithSpecificClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;footer p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns an HTML element.&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;console&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="nx"&gt;elementWithSpecificClass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// &amp;lt;p&amp;gt;this is footer&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h3&gt;Get more than 2 elements using CSS selector&lt;/h3&gt;

&lt;p&gt;When you want to get all elements that matches a specific CSS selector, &lt;em&gt;querySelectorAll()&lt;/em&gt; method allows it. And you need to know it returns a NodeList, not single HTML element, not an array.&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;let&lt;/span&gt; &lt;span class="nx"&gt;elementAllWithClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns a NodeList.&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;console&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="nx"&gt;elementAllWithClass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// [ {0:p}, {1:p}, {2:p}, {3:p} ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;What is difference between HTMLCollection and NodeList ?&lt;/h3&gt;

&lt;p&gt;As I mentioned earlier, only querySelectorAll() returns NodeList. The differences between the two are...&lt;/p&gt;

&lt;h4&gt;Dynamic or Static&lt;/h4&gt;

&lt;p&gt;When number of elements of HTMLCollection or NodeList changes,&lt;br&gt;
HTMLCollection is dynamic then it can catch the change. But NodeList is static then its number of elements doesn't change.&lt;/p&gt;

&lt;h4&gt;Availability of forEach()&lt;/h4&gt;

&lt;p&gt;Available methods are different between HTMLCollection and NodeList. And common one is forEach method. HTMLCollection is available forEach(), but NodeList is not. So when you use loop process with NodeList, you should other method.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How capitalize the first letter of each word in a string?</title>
      <dc:creator>Mayu Hayakawa</dc:creator>
      <pubDate>Fri, 16 Sep 2022 22:50:40 +0000</pubDate>
      <link>https://dev.to/mayuhayakawa/how-capitalize-the-first-letter-of-each-word-in-a-string-nji</link>
      <guid>https://dev.to/mayuhayakawa/how-capitalize-the-first-letter-of-each-word-in-a-string-nji</guid>
      <description>&lt;p&gt;Hi! I'm Mayu.&lt;br&gt;
In this post, I introduce how to change letter's case in JavaScript.&lt;/p&gt;

&lt;p&gt;Now, here is a sentence about me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;i LOVE JaVa SpaRRoW!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How do you feel when you read this sentence?&lt;br&gt;
A little weird...is it?&lt;br&gt;
(By the way, recently I realized this is an expression of interesting intonation. I didn't know this before I started learning English, so I am happy about this realization!)&lt;/p&gt;

&lt;p&gt;So, let's make function to the sentence to be more readable :)✨&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;function&lt;/span&gt; &lt;span class="nx"&gt;changeLetter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&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;word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&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;let&lt;/span&gt; &lt;span class="nx"&gt;arr&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;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;word&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="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;push&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;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;charAt&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="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&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;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;substring&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="nx"&gt;toLowerCase&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;arr&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;span class="nx"&gt;console&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="nx"&gt;changeLetter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;i LOVE JaVa SpaRRoW!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="c1"&gt;// I Love Java Sparrow!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;1. Set space as separater and split sentences into words.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split"&gt;&lt;strong&gt;split()&lt;/strong&gt;&lt;/a&gt; to split sentence with spaces(" ").&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Add elements that capitalized only the first letter to the array.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use loop because each texts have more than 2 words.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt"&gt;&lt;strong&gt;charAt()&lt;/strong&gt;&lt;/a&gt; method that returns new string&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase"&gt;&lt;strong&gt;toUpperCase()&lt;/strong&gt;&lt;/a&gt; method returns the calling string value converted to uppercase&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring"&gt;&lt;strong&gt;substring()&lt;/strong&gt;&lt;/a&gt; method that returns the part of the string&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase"&gt;&lt;strong&gt;toLowerCase()&lt;/strong&gt;&lt;/a&gt; method returns the calling string value converted to lowercase&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push"&gt;&lt;strong&gt;push()&lt;/strong&gt;&lt;/a&gt; method that adds elements to the end of an array&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Return to a sentence with a space between words.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join"&gt;&lt;strong&gt;join()&lt;/strong&gt;&lt;/a&gt; method creates and returns a new string by concatenating all of the elements in an array, separated by commas or a specified separator string.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;reference: &lt;a href="https://developer.mozilla.org/en-US/"&gt;mdn&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to push your file to git hub?</title>
      <dc:creator>Mayu Hayakawa</dc:creator>
      <pubDate>Sun, 04 Sep 2022 22:29:51 +0000</pubDate>
      <link>https://dev.to/mayuhayakawa/how-to-push-your-file-to-git-hub-5em6</link>
      <guid>https://dev.to/mayuhayakawa/how-to-push-your-file-to-git-hub-5em6</guid>
      <description>&lt;p&gt;&lt;strong&gt;The first way&lt;/strong&gt;&lt;br&gt;
Commit Local repository to Remote repository&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Create directory and some files on your computer&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OmyJUgU0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1a3r6tnyvk2ibod3mdh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OmyJUgU0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1a3r6tnyvk2ibod3mdh.png" alt="Image description" width="422" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Create Remote repository on git hub&lt;/strong&gt;&lt;br&gt;
Push "new button"&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gJGR8EyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6plx00hapl6n4rog9q0b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gJGR8EyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6plx00hapl6n4rog9q0b.png" alt="Image description" width="880" height="286"&gt;&lt;/a&gt;&lt;br&gt;
set about repository name, Public or Private, if you need add a README file.&lt;br&gt;
Then push Create repository.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gAPCjEEM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fa8rs0hz4eyk6fwy7qx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gAPCjEEM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fa8rs0hz4eyk6fwy7qx.png" alt="Image description" width="880" height="1073"&gt;&lt;/a&gt;&lt;br&gt;
Did it!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bv4XcJLB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lv8fn0u956idzrv8hio5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bv4XcJLB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lv8fn0u956idzrv8hio5.png" alt="Image description" width="880" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Create Local repository on directory you just made&lt;/strong&gt;&lt;br&gt;
Command: git init&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O2-Z6HCz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpct2y2miqbzkbz5hat0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O2-Z6HCz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpct2y2miqbzkbz5hat0.png" alt="Image description" width="880" height="300"&gt;&lt;/a&gt;&lt;br&gt;
-git folder(hidden) appear&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d9ykS0e1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gxbf943g4yv9f82ylwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d9ykS0e1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gxbf943g4yv9f82ylwq.png" alt="Image description" width="410" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Add file to index&lt;/strong&gt;&lt;br&gt;
?What is Index?&lt;br&gt;
-Index is an area where changes are temporarily stored before commit, and only files added to the index are subject to commit.&lt;br&gt;
command: git add bun.index(👈file's name)&lt;br&gt;
;If you want to commit all files, command: git add .&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UFqEc2Jv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7yk9bqi1t3qwf5k5eko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UFqEc2Jv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7yk9bqi1t3qwf5k5eko.png" alt="Image description" width="660" height="72"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Commit file to local repository&lt;/strong&gt;&lt;br&gt;
?What is Commit?&lt;br&gt;
-Commit means the operation of reflecting file additions and changes in the local repository.&lt;br&gt;
Command: git commit -m "some comment"(👈kind of memo)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--23gu0D7p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm47mkifz7g04p6923ph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--23gu0D7p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm47mkifz7g04p6923ph.png" alt="Image description" width="880" height="150"&gt;&lt;/a&gt;&lt;br&gt;
You can check the change history including commit messages by entering git log command.&lt;br&gt;
Command: git log&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uWjgbaJO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hl92hxxarv0n9uuwh8n9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uWjgbaJO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hl92hxxarv0n9uuwh8n9.png" alt="Image description" width="880" height="243"&gt;&lt;/a&gt;&lt;br&gt;
When you want quit checking log, please enter "q".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Linking local and remote repositories&lt;/strong&gt;&lt;br&gt;
Command: git remote add origin repository's URL(👈You can copy this from your git hub)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bg1aTpCZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2a9bb2fmdwn1fawnq3mc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bg1aTpCZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2a9bb2fmdwn1fawnq3mc.png" alt="Image description" width="880" height="104"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r76x_WA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckacoumu31yt34rs5180.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r76x_WA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckacoumu31yt34rs5180.png" alt="Image description" width="880" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6) Push file to remote repository&lt;/strong&gt;&lt;br&gt;
?What is Push?&lt;br&gt;
-Push is to reflect changes in a local repository to a remote repository on GitHub.&lt;br&gt;
Command: git push origin branch's name(👈You can check with command: git branch)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CQLJhQCL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/glzt3juh11fzcilawv64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CQLJhQCL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/glzt3juh11fzcilawv64.png" alt="Image description" width="408" height="104"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3qe7WQFX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckg0wfquu38h921bdegq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3qe7WQFX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckg0wfquu38h921bdegq.png" alt="Image description" width="880" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ta-da!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QScwJMsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyc9u6py890uxxy1kksl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QScwJMsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyc9u6py890uxxy1kksl.png" alt="Image description" width="880" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second way&lt;/strong&gt;&lt;br&gt;
Clone source codes from Remote repository on your Local&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Clone source codes from Remote repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Make your branch&lt;/strong&gt;&lt;br&gt;
?What is branch?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Commit files to branch you made&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Push file to remote repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;reference(Japanese)&lt;br&gt;
&lt;a href="https://tech-blog.rakus.co.jp/entry/20200529/git"&gt;https://tech-blog.rakus.co.jp/entry/20200529/git&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why I want to be an engineer</title>
      <dc:creator>Mayu Hayakawa</dc:creator>
      <pubDate>Sat, 03 Sep 2022 23:15:55 +0000</pubDate>
      <link>https://dev.to/mayuhayakawa/what-i-want-to-do-as-an-engineer-32lm</link>
      <guid>https://dev.to/mayuhayakawa/what-i-want-to-do-as-an-engineer-32lm</guid>
      <description>&lt;p&gt;Hi! My name is Mayu, from Japan.&lt;br&gt;
Now I'm living in Canada and college student majoring in programming. For my first post, I write a bit about my goal as an engineer and myself to keep it in my mind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My history of career so far&lt;/strong&gt;&lt;br&gt;
In Japan, it is generally considered good to get a job right after college. So I was also looking for a job while I was a university student. But at that time I didn't understand what kind of job I wanted to get, I just felt that what I want to do in my career is to solve someone's problem. Then, I decided to become a programmer because I thought that if I became a programmer, I could solve a lot of problems in a lot of different ways. &lt;/p&gt;

&lt;p&gt;As I had hoped, I got a job with a tech field company. But I couldn't get a position as a programmer because I didn't have the aptitude to be a programmer. Instead I was placed in an office clerk position.&lt;/p&gt;

&lt;p&gt;A little later, I quit that job because I couldn't find my goal. But I had to work to live so I was looking for a job at random with no skills, no goal in my life. And fortunately I found a job as an office clerk in purchasing.&lt;/p&gt;

&lt;p&gt;At first I was working just to earn money, but I realized that I could get more than just money through my work. So one day I suggested to my boss that he let me try more other jobs to advance my career. However, he told me that he turned it down because I am a woman. According to him, negotiations are not for women. It was too frustrating. I could understand if he had refused my request due to lack of skill, though.&lt;br&gt;
Like that, I couldn't get a position that I wanted to do because I was not suitable again. But this made me notice I was trying to give up on my goals based on what others evaluated again. Then I decided to try what I am interested in. Someone may think it weird, but it's the biggest challenge for me, who has made safety choices. &lt;/p&gt;

&lt;p&gt;That's way, I quit that job and moved to Canada to learn programming and English to achieve my goal in my life that I built in the past. :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did I choose to change my career&lt;/strong&gt;&lt;br&gt;
As I mentioned earlier, I've always wanted to create something that solves someone's problem. And the desire grew ever more through my experience as an office clerk.&lt;br&gt;
When I was an office clerk, I saw many people working overtime with many tasks everyday. But they were almost simple and repetitive jobs. So I made an easy system with Visual Basic Application for co-workers, and they were happy. This made me realize that programming can really help people and that I can create it. At the same time I felt I wanted to make a bigger system that is able to make things easier for a lot of people.&lt;/p&gt;

&lt;p&gt;So why did I choose to study abroad instead of in Japan? The purpose is language. Embarrassingly, I had never studied English outside of school and had no interest in it. Because I can live in Japan without English. But after starting programming I realized that if I could understand, speak English, the resources I could get would be wide. Then I chose to learn programming in English. It has been 6 months since I moved to Canada and it is very difficult to learn anything other than my native language. However, using English as a means to learn programming rather than as an end in itself works very well for me. It is because learning English will become very necessary for me.&lt;/p&gt;

&lt;p&gt;By the way, I got married 2 years ago. This event also influenced my career. When I got married, I was working as an office clerk yet. And it is also said to be "common sense" in Japan, after getting married, a couple has children, a house, the husband should work hard mainly at his job and the wife should work hard mainly at her housework. I think this way of life is one of happiness. But at least in the company I was in, it was considered normal and a common idea among everyone. So after I got married, my boss was not going to put me in a position where I could challenge because he thought I would have children within a year or two, despite I told him I didn't have any plan like he thought. This made me felt that I've shouldn't get married if I've wanted to challenge something in my career...(Of course, it isn't true!) But if I had many skills, my boss's mind could change. And I'm not able to change how they think about my gender, but I can build up my skill. So I decided to concentrate to improve my skill, not worry about my environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My goal as an engineer&lt;/strong&gt;&lt;br&gt;
As you know, my goal as an engineer is to create useful applications that are easy to use for everyone.&lt;br&gt;
Aside from continuing to achieve this goal, I have another goal ;) That is to make games. I love games. I've played games since I was 5. Through games I made a lot of friend, I had a lot of experiences like enjoyment, patience, &lt;br&gt;
So I hope that one day I create a game that connects people, a game that triggers different emotions, something that can touch someone's life.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;At last&lt;/strong&gt;&lt;br&gt;
Thank you for reading my first post &amp;lt;3&lt;/p&gt;

&lt;p&gt;Pursuing my goal is very hard. I realize that there are many things I can't, I'm upset by my own uselessness. But at the same time, I realize that I'm living my life without being driven by others like I used to be. But I am grateful for my past experiences because they have allowed me to think this way now.&lt;/p&gt;

&lt;p&gt;And For...&lt;br&gt;
My parents, sister friends who support me from Japan,&lt;br&gt;
My husband who comes to Canada with me,&lt;br&gt;
My teachers and classmates who always help me,&lt;br&gt;
Everyone who is involved with me and supports me,&lt;br&gt;
I will do my best to return the favor in the form of being useful to society.&lt;/p&gt;

&lt;p&gt;To be honest, it took a long time to make this post because of my English skill. And a lot of things that I want to write still remain but I can't make sentences well now. I'm very frustrated but this experiences inspire me to keep going. So I will keep to try new things. I'll keep my effort for my goal!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
    </item>
  </channel>
</rss>
