<?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: Edwin Henriquez</title>
    <description>The latest articles on DEV Community by Edwin Henriquez (@edwincoder).</description>
    <link>https://dev.to/edwincoder</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%2F419202%2F773d99f4-800f-4197-8326-5410f19b155f.jpeg</url>
      <title>DEV Community: Edwin Henriquez</title>
      <link>https://dev.to/edwincoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/edwincoder"/>
    <language>en</language>
    <item>
      <title>Flex With Flex Box  💪 😎 👊 </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Thu, 14 Jan 2021 14:59:09 +0000</pubDate>
      <link>https://dev.to/edwincoder/flex-with-flex-box-58id</link>
      <guid>https://dev.to/edwincoder/flex-with-flex-box-58id</guid>
      <description>&lt;p&gt;When you initially create elements for a page, by default they appear stacked. You’ll see that the box of the element takes up the whole width of the page. You can tweak css properties or position elements with the position property to get your desired layout but this can become tedious work. Flex box can help with laying out elements in rows or columns. W3schools states, “The Flexible Box Layout Module, makes it easier to design flexible responsive layout structure without float or positioning.” In this blog I will demonstrate simple Flex properties that can help create layout for your UI.&lt;/p&gt;

&lt;h1&gt;
  
  
  Flex Container
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--srulY6Jm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xy951y19lwzggv5gxvwo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--srulY6Jm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xy951y19lwzggv5gxvwo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&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;The display property set to flex, will identify the container as a flex container so you can utilize other properties to manipulate the way child elements take up space. Before you set your display property on the container element. Notice the elements are stacked on top each other. Once you set display to flex they will appear lined up in the container. &lt;/p&gt;

&lt;h1&gt;
  
  
  Axes of Flexbox
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DycY4oNc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-media-1.freecodecamp.org/images/HHwxqz2N4bNksz9YwcMBAtD0z9TTCxeNXNBS" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DycY4oNc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-media-1.freecodecamp.org/images/HHwxqz2N4bNksz9YwcMBAtD0z9TTCxeNXNBS" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexbox properties work based off two axes. The main axis, which children of the flex container are laid out. By default the main axis is horizontal but can be vertical depending on the setting of the flex-direction property that I will show in this blog. The cross axis is perpendicular to the main axis. It can be horizontal if the main axis is vertical or vertical if the main axis is horizontal. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Flex Container CSS Properties
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GJYO4x3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/coomt5b73nzsbi4ui59e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GJYO4x3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/coomt5b73nzsbi4ui59e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row-reverse&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flex-direction by default is set to row. Which will align elements left to right. When setting it to row reverse it does the opposite as shown above.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QKv8NtKo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gr95gp22i4376b9oqzp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QKv8NtKo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gr95gp22i4376b9oqzp4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;250px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column-reverse&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;flex-direction can be set to column which will position elements order first to last and top to bottom. column-reverse will do the opposite as shown above. &lt;/p&gt;

&lt;p&gt;Make sure the height property accommodates how many elements will be placed on the page so that elements don't fall off. This is why I changed the height to 250px.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--68JSQjmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s00skuhntwet4tkveran.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--68JSQjmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s00skuhntwet4tkveran.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-evenly&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The justify-content property is set to flex-start by default but here I use space-evenly. Justify-content can be used to give space between and around elements in the container. There are many values you can set to justify-content. Feel free to explore them! &lt;/p&gt;

&lt;h1&gt;
  
  
  Flex Child CSS Properties
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dNi6c9Bn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qfg681r758c96mh0e2g1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dNi6c9Bn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qfg681r758c96mh0e2g1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#three&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;flex-grow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also set properties on children of the flex container. You can set flex-grow or flex-shrink to change the size of an element. Negative numbers cannot be used. There are many more properties you can use on children elements. Check out &lt;a href="https://yoksel.github.io/flex-cheatsheet/"&gt;https://yoksel.github.io/flex-cheatsheet/&lt;/a&gt; for more! &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Flex box can make your page responsive to any screen size. Based on research iv'e read that they are best paired with grid systems to get the job done. By setting a containers css property display to flex. You can then use other properties to align child elements or space them out. You can even rearrange the order of child elements , grow them, shrink them, and many other techniques. If your interested in Flex Box, dig a little deeper because there is always more room to grow! Thank you for reading.&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>Using React Hooks </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Mon, 04 Jan 2021 15:02:20 +0000</pubDate>
      <link>https://dev.to/edwincoder/using-react-hooks-3hdp</link>
      <guid>https://dev.to/edwincoder/using-react-hooks-3hdp</guid>
      <description>&lt;p&gt;Sometimes when working on a project you don’t really know what components will be stateful or stateless. This is something you might consider before hand so you can make a component either classed based or functional . Since state can only exist inside of class based components, you will have to refactor your functional component to be a class based component if you’ve come to the conclusion that it needs state. This can take valuable time away from you and sometimes a hassle to refactor. React hooks can help you make clean code and easily manage state inside of a functional component! In this blog I will show you how you can use the React hook &lt;strong&gt;useState&lt;/strong&gt; to your advantage. Make sure you’re using react version 16.8 or higher to utilize hooks.&lt;/p&gt;

&lt;h1&gt;
  
  
  How To Use Hooks
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react'

function ToDoListForm() {

    return (
      &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;My Todo List!&amp;lt;/h1&amp;gt;
        &amp;lt;input/&amp;gt;
        &amp;lt;button&amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }

  export default ToDoListForm;

                                          //ToDoListForm.Js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, import the hook that you want to use in your functional component. &lt;br&gt;
There are multiple hooks react provides like useEffect, useContext and useReducer. You can read more about them &lt;a href="https://reactjs.org/docs/hooks-overview.html"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react'

function ToDoListForm() {

    const [ inputTask, setInputTask ] = useState('')

    const submitHandler = () =&amp;gt; {

      }

    return (
      &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;My Todo List!&amp;lt;/h1&amp;gt;
        &amp;lt;input/&amp;gt;
        &amp;lt;button&amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }

  export default ToDoListForm;
                                      //ToDoListForm.Js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, useState returns an array of two elements. The first element will be your current state. The second element will be &lt;br&gt;
a function which will set your state. It would be best to use array destructuring for readability. I am also initializing my state to be an empty string. A key difference with state and a hook as opposed from class based state is you can initialize your state with anything you want. A string, array, boolean, or object. Where in class based, the state is always an object.In this case i'm initializing with an empty string since thats what I receive back from the onChange event.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react'

function ToDoListForm() {

   const [ inputTask, setInputTask ] = useState('')

   const submitHandler = () =&amp;gt; {

   }

    return (
      &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;My Todo List!&amp;lt;/h1&amp;gt;
        &amp;lt;input
          type="text"
          value={inputTask}
          onChange={ event =&amp;gt; {
              setInputTask(event.target.value)
            }
           }
        /&amp;gt;

          &amp;lt;button &amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }

  export default ToDoListForm;                 
                                  //ToDoListForm.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Third, set the state every time the user types. You can use an onChange event for this. onChange will retrieve values from whatever is typed in the input. We can get this value through &lt;strong&gt;event.target.value&lt;/strong&gt;. Remember how useState returns a second element which is a function that will update the state? Well here we can simply invoke it passing through &lt;strong&gt;event.target.value.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react'

function ToDoListForm(props) {

   const [ inputTask, setInputTask ] = useState('')

   const submitHandler = () =&amp;gt; {
     props.addUserTask({task: inputTask});
   }

    return (
      &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;My Todo List!&amp;lt;/h1&amp;gt;
        &amp;lt;input
          type="text"
          value={inputTask}
          onChange={ event =&amp;gt; {
              setInputTask(event.target.value)
            }
           }
        /&amp;gt;
          &amp;lt;button onClick={submitHandler}&amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }

  export default ToDoListForm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we will use the prop (props.addUserTask) passed down from the parent component that will retrieve the input values to an array of task once the user clicks the button. All we need to do is pass in the first element useState returns ,which is the current state, to props.addUserTask. I pass in an object because thats the way i'm carrying my data to the sibling component in the parent component. There I will take the value out and render it to the screen. I hope you now have a good understanding how hooks work! Thanks for reading and happy coding. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is AJAX ?</title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Tue, 22 Dec 2020 14:58:19 +0000</pubDate>
      <link>https://dev.to/edwincoder/what-is-ajax-1c8i</link>
      <guid>https://dev.to/edwincoder/what-is-ajax-1c8i</guid>
      <description>&lt;p&gt;Imagine scrolling down on twitter when suddenly the whole page refreshes on you! Imagine this happening every ten seconds just so twitter can show you new tweets. You were probably reading comments or a post that you were very interested in, but now lost your spot because the whole page just refreshed on you. If this happened, you will probably think the website is broken and never want to use it again. To prevent this bad experience, Twitter and Instagram use AJAX. AJAX stands for Asynchronous Javascript and XML. It uses an asynchronous processing model to render dynamic components of a page without having to refresh the entire page. The features that update itself without having to refresh the browser like amount of followers, new tweets, and new post are all results of using AJAX. &lt;/p&gt;

&lt;h1&gt;
  
  
  Working AJAX
&lt;/h1&gt;

&lt;p&gt;Since you don’t have to load the whole page the data will load faster! This improves the users experience and also allows users to do other things on the page until that section of the page comes back with new data. AJAX gets the browser to request data from the server. Then the server sends back data that is in  HTML , XML or JSON format. You can read more about &lt;a href="https://www.quirksmode.org/blog/archives/2005/12/the_ajax_respon.html" rel="noopener noreferrer"&gt;AJAX response data formats&lt;/a&gt; here . Once the browser has successfully received the data it needs, it will fire an event that renders the new data to the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmuk7go8ql72pz74i8vm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmuk7go8ql72pz74i8vm3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This AJAX call is enclosed in a jQuery on click event.&lt;br&gt;
There are some settings you must set before making the AJAX call. The first to take a look at is the &lt;strong&gt;url&lt;/strong&gt; property. You must have the correct endpoint to get back data from your server. In this, i'm using a joke api to render random jokes to my plain Jane page. The &lt;strong&gt;type&lt;/strong&gt; property will take a HTTP verb GET or POST to retrieve data depending on what you need back. GET will retrieve data already saved to the database and POST will update the database with new information retrieved. &lt;strong&gt;Timeout&lt;/strong&gt; will do what it says, timeout after five seconds if the server doesn't respond. &lt;strong&gt;BeforeSend&lt;/strong&gt; method will display loading if it takes a while to load or an error occurs. Finally if the request come back correctly the &lt;strong&gt;success&lt;/strong&gt; function will run which appends my jokes to the web page. If there is a problem with the request, the &lt;strong&gt;error&lt;/strong&gt; function will fire off!&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdo51v7cqcdrfx0vmqtla.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdo51v7cqcdrfx0vmqtla.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Now when you click the joke button it will request new jokes from the server. &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;My example was plain but I wanted to show at the simplest level how AJAX is used. This can be a powerful technique due to its asynchronous processing model. You can improve the users experience by having components on the page render without refreshing the page entirely. It also makes your data load faster. Also, using Ajax with Jquery can also make things easier when requesting and appending data back onto the page. Thank you for reading ! Happy coding!&lt;/p&gt;

</description>
      <category>beginners</category>
    </item>
    <item>
      <title>A peek at Bloom Filters </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Mon, 14 Dec 2020 14:39:30 +0000</pubDate>
      <link>https://dev.to/edwincoder/a-peek-at-bloom-filters-l8e</link>
      <guid>https://dev.to/edwincoder/a-peek-at-bloom-filters-l8e</guid>
      <description>&lt;p&gt;I talked with a peer about a bloom filter and it sounded interesting so I decided to explore further. A bloom filter , not a snapchat filter, is a data structure that prevents expensive queries on a database. In this blog I will talk about the inner workings of the bloom filter that make the bloom filter so efficient. I also have never made a bloom filter nor am I an expertise on bloom filters. This is my understanding of how bloom filters work based on the research I have done. &lt;/p&gt;

&lt;h1&gt;
  
  
  How it's made ?
&lt;/h1&gt;

&lt;p&gt;The bloom filter uses an array to store a one at a certain locations in the array based on the hash value. Remember arrays are zero based indexed so the first bucket will be 0 bits. The hash value will be a number that is less than the the size of the array. Based on the length of the array and the amount of hash functions used will determine the probability of a false positive. A false positive in this case would mean that the bloom filter will return true for a member in the data set when really it isn’t. This happens occasionally. The good news is that it will never give you a false negative. Returning false for a member that’s actually in the data set.&lt;/p&gt;

&lt;h1&gt;
  
  
  Visuals
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dyyEq-5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qjwtke3iyo1u52jx7hqt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dyyEq-5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qjwtke3iyo1u52jx7hqt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Looking at the array you will see 0s and 1s filled in the buckets. Items are hashed and stored in the set. Hash functions will always hash the same inputs to the same values (hash value). In the above picture x, y, and z are present in the data base. We know this by looking at the hash values for the letters which reference where the one will be stored in the array. If there is a one at every location in the array, it will return true. In the case where a member is not in the set like W. When looking at the locations and if zero is the value. The bloom filter will return false immediately. Preventing an expensive query. Sometimes an input value that is not in the database can be hashed to the same value as one that is in the database. This is where returning a false positive can happen. Rarely this happens but determining how many items you want to store and hash functions you want to use before hand will prevent the chances of this happening. &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;The bloom filter is an approximate data structure because occasionally you can get a false positive. It’s efficient because it checks an array to see if an input item has been there before. If it hasn’t it can immediately return false. This prevents going through the whole data base which can take a lot of time and programmers are all about optimizing time complexity. Many companies use bloom filters like Bing, Medium, and bitcoin. Here is a link on how those companies put the bloom filter to use &lt;a href="https://en.wikipedia.org/wiki/Bloom_filter#Examples"&gt;https://en.wikipedia.org/wiki/Bloom_filter#Examples&lt;/a&gt;. Thanks for reading!&lt;/p&gt;

</description>
      <category>database</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Prototype Delegation </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Thu, 19 Nov 2020 04:53:28 +0000</pubDate>
      <link>https://dev.to/edwincoder/prototype-delegation-2855</link>
      <guid>https://dev.to/edwincoder/prototype-delegation-2855</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;In JavaScript, a prototype is a hidden property on an object that references an object or is set to null. If the script runs and can’t find a property/method in the targeted object. It then checks to see if the prototype could potentially have the property/method. In the following examples I will demonstrate how prototype delegation works. &lt;/p&gt;

&lt;h1&gt;
  
  
  The Prototype
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uxPo0hpx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5xbsu7oeka2jyrtlw9ni.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uxPo0hpx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5xbsu7oeka2jyrtlw9ni.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Here I will set car to be the prototype of different types of cars. We can use car to behave as a storage of many different methods but in this case we will have an accelerate method that will print to the console how fast a particular car accelerates. The keyword &lt;strong&gt;this&lt;/strong&gt; will refer to the object that's at the left of the dot at call time.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prototypal inheritance
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cyYfRVve--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/odg1mz59bt1xdtm8wqa3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cyYfRVve--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/odg1mz59bt1xdtm8wqa3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kYO14W4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0l04psxg4jgnn0qi4rsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kYO14W4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0l04psxg4jgnn0qi4rsv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
To use the accelerate method on the hellCat object you have to set hellCat's prototype to car. A way to accomplish this is to create a property with the key as two underscores on each side of the word proto and the value the desired object. Car is now the parent to the hellcat object! When accelerate gets invoked with hellCat to the left of the dot, the script will run to see that it does not have the method inside hellCat. Since car is set to the prototype. Hellcat inherits the accelerate method so "Hellcat accelerates 0 to 60 in 3.6 seconds" gets printed to the console. &lt;/p&gt;

&lt;h1&gt;
  
  
  Prototype chain
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sevxgIw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h6zy82433sj4prrxlz5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sevxgIw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h6zy82433sj4prrxlz5z.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5kWensis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/g80oy69wzvo7m46gtmwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5kWensis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/g80oy69wzvo7m46gtmwa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Here Zr1's prototype is set to hellcat. When the script runs it will see that the accelerate method is not in Zr1. Although, Zr1 did inherit hellCat's characteristics. Which hellCat inherited characteristics from car object. This demonstrates the script going up the prototype chain until it finds the method in car.&lt;/p&gt;

&lt;p&gt;I hope I could help you understand how prototype delegation works. This is also a form of prototypal inheritance which some programmers might not agree with. Maybe I'll post on that but until next time thanks for reading! Peace!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Intro to Bootstrap</title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Mon, 31 Aug 2020 13:57:14 +0000</pubDate>
      <link>https://dev.to/edwincoder/intro-to-bootstrap-4n3i</link>
      <guid>https://dev.to/edwincoder/intro-to-bootstrap-4n3i</guid>
      <description>&lt;p&gt;Styling a website can be tedious in the first days of becoming a programmer. Maybe you just want to focus on the functionality of your website but still have a presentable website. You can do this with Bootstrap. A popular HTML, CSS, and JavaScript framework that can give us a responsive website without needing to write much code. In this blog I will show you how to plug in a navigation bar, form, and buttons to quickly make your website look appealing with Bootstrap. &lt;/p&gt;

&lt;h1&gt;
  
  
  Installing Bootstrap
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5W2mSvy8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mizihcey7rachm6e7uz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5W2mSvy8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mizihcey7rachm6e7uz0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
There are two ways you can install Bootstrap. You can download the file and link to it locally in the link tag, otherwise link to a CDN that is provided on the Bootstrap website &lt;a href="https://getbootstrap.com/"&gt;https://getbootstrap.com/&lt;/a&gt;. Also, if you want the drop down bars to work or any kind of functionality that comes with it. You must download jQuery and the JavaScript file that's provided on Bootstrap. I will only be using the css file in this blog.&lt;/p&gt;

&lt;h1&gt;
  
  
  A Simple Nav Bar
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mmBN2oQT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf4n9yixc4y0htv0wkc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mmBN2oQT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf4n9yixc4y0htv0wkc2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zrPQ6UGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o7voot23xbfwzpshf96f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zrPQ6UGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o7voot23xbfwzpshf96f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
In Bootstrap you chose your styling by the name of the class. Since code is already pre defined, all you have to do is reference the class of a particular style. This format was grabbed from the components section on Bootstrap. You can adjust the default of that class. You would just have to go into the css file and make the changes you want whether it be a color, font size, etc. Heads up! It will be tons of classes already defined so I would use the find bar on your code editor to target the class quickly and make your tweaks. There are many components you can add to your navbar. Notice the anchor tag with a class of "navbar-brand". This allows the user to click the brand and redirect them to the link in your href attribute. You can also add drown down menus or add more links in your nav bar.Refer to the nav bar section under components to explore your options &lt;a href="https://getbootstrap.com/docs/4.5/components/navbar/"&gt;https://getbootstrap.com/docs/4.5/components/navbar/&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding A Jumbo Tron Because Why Not?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jxA5PP_t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tlaqgoyypcikwirb91lz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jxA5PP_t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tlaqgoyypcikwirb91lz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sLanx7WY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/demgril3uah37cijvijv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sLanx7WY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/demgril3uah37cijvijv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
This jumbo tron was quickly created within seconds. Although the html structure looks simple to make, it is the "jumbotron" class that has properties to make it presentable. Note that there is a div with a class of "container" to center this jumbotron in the middle of the page. Without this class, it would take up the entire width of the screen. Bootstrap provides a grid system to position your components but you can use this class for now to center your components, add spacing, and padding around your elements.To find more formats refer to components section.&lt;br&gt;
&lt;a href="https://getbootstrap.com/docs/4.5/components/jumbotron/"&gt;https://getbootstrap.com/docs/4.5/components/jumbotron/&lt;/a&gt;. &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Bootstrap is used by many companies. Learning to use this framework will only benefit you and make your website look more appealing. Why work harder when you can work smarter? You can focus on the functionality of your website or app more. This is an excellent tool especially if you want to throw some css into your app quickly without devoting too much time to styling. Thank you for reading!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>css</category>
    </item>
    <item>
      <title>A Peek At jQuery </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Tue, 25 Aug 2020 14:03:21 +0000</pubDate>
      <link>https://dev.to/edwincoder/a-peek-at-jquery-9l8</link>
      <guid>https://dev.to/edwincoder/a-peek-at-jquery-9l8</guid>
      <description>&lt;p&gt;Learning how to program can be a bit intimidating at first, but no worries I've found an amazing tool that can inspire you to dig deeper into programming. That tool is j Query! A JavaScript library or framework designed to make manipulating the DOM easier and solve browser compatibility problems. &lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mVjdia5i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yjho2pfg0m449j1isvyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mVjdia5i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yjho2pfg0m449j1isvyc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Start up your code editor and in your html file put a script tag inside your head tag. In the script tag you will link your src to a local file or a CDN (Content Delivery Network). For further instructions check the j Query download page &lt;a href="https://jquery.com/download/"&gt;https://jquery.com/download/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Selecting Elements
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xZL4RAnd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rfzgv2sdfzs73q140f6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xZL4RAnd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rfzgv2sdfzs73q140f6f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pttVDptd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qz235bq2afa3w8lbjziv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pttVDptd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qz235bq2afa3w8lbjziv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can select any element in the DOM using $("value"). In this example i'm doing something very simple by just changing the header but only for you to understand the syntax. I follow up with .text("") method to change the text to "King of the Jungle"! You can select by specifying the $("element") , $(".className") , or $("#idName").&lt;/p&gt;

&lt;h2&gt;
  
  
  Styling
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KfrvyCyW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s85ujxylqtwo107w2a2r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KfrvyCyW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s85ujxylqtwo107w2a2r.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C5WMsiJF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n2kpfa7vwtepg3jrop7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C5WMsiJF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n2kpfa7vwtepg3jrop7v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
The way you style with j Query is by using the .css() method.The first argument will be the name of the property and the second a value. This can be very effective in manipulating multiple things at once or even just one element at a time without the use of writing loops in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Events
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fev8UHe---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ehkbxazxx7foceizmrk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fev8UHe---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ehkbxazxx7foceizmrk5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Bv8uoIrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/inq7n5078mfjytfd3mvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bv8uoIrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/inq7n5078mfjytfd3mvc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
The .on() method is a popular method that will carry out code based on the specified event. Since we want a li to change color if it gets clicked. We must use the keyword &lt;strong&gt;this&lt;/strong&gt;, which refers to the specific li that was clicked. If we were to use Vanilla JavaScript (JavaScript without j Query) there would be more code to carry out this event. This is more understandable, concise, and easy to write.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;It is a great debate if new comers should learn j Query. Developers say it's easy to write spaghetti code because of it's simplicity. It was made to solve browser compatibility problems in 2006 but we don't have those problems anymore. Although, Uber, Twitter , Reddit and many more companies still use j Query.I suggest to learn j Query especially if you want to be on the front end.Then when you get a better understanding of things learn some JavaScript to have more control of your code.Even take a look into j Query's cousins React and Angular. There are many resources and YouTube videos that can help you. Why not learn something new? Happy Coding. Thanks for reading!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jquery</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Copy by Value vs Copy by Reference </title>
      <dc:creator>Edwin Henriquez</dc:creator>
      <pubDate>Tue, 30 Jun 2020 13:31:15 +0000</pubDate>
      <link>https://dev.to/edwincoder/copy-by-value-vs-copy-by-reference-28md</link>
      <guid>https://dev.to/edwincoder/copy-by-value-vs-copy-by-reference-28md</guid>
      <description>&lt;p&gt;We hold values in memory using the keywords var, let, or const. These variables can behave differently depending on where you use it in your code but they all store data the same. &lt;br&gt;
In JavaScript datatypes can fall under two categories, primitive datatypes (simple) and complex datatypes. &lt;/p&gt;

&lt;p&gt;Primitive datatypes consist of: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strings&lt;/li&gt;
&lt;li&gt;Numbers&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;NaN (Not a number)&lt;/li&gt;
&lt;li&gt;Undefined&lt;/li&gt;
&lt;li&gt;Null&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Complex consist of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Objects&lt;/li&gt;
&lt;li&gt;Arrays&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on the type of data you are storing in your variable they can behave differently when referenced to carry out a desired task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Copy by Value
&lt;/h2&gt;

&lt;p&gt;When a variable stores a simple datatype it scans the value making a replica , like Bumblebee does in Transformers, to keep unless it gets reassigned another value. Note you can reassign let and var. Const must be assigned immediately a value and can't ever be changed. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BVKOTn7g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zl8yb8y64nkrmq1oox65.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BVKOTn7g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zl8yb8y64nkrmq1oox65.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On line two, num2 copy's the value in num1 because num1 contains a simple datatype. Then on line four num2 gets reassigned the number seven but that doesn't change num1 since they both hold their own copies of a number. &lt;/p&gt;

&lt;h2&gt;
  
  
  Copy by Reference
&lt;/h2&gt;

&lt;p&gt;When a variable is assigned a complex datatype it is really pointing to the address in memory where that complex datatype is &lt;br&gt;
stored. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GCKgLVQy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xo9idnoc12rnq042z8yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GCKgLVQy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xo9idnoc12rnq042z8yo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although they have the same guts. These two objects have their own address in memory. Therefore it is the address they copy and not the value. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6u72E7xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9wwc8c6fz4h2hpwh77jm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6u72E7xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9wwc8c6fz4h2hpwh77jm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's step in line by line. On line one obj1 is technically pointing to the address of this object. Line two, obj2 is assigned obj1. Which must mean that they both now point at the same address. On line three obj2 is then accessed to update the number property to seven. Since obj1 and obj2 refer to the same object address. When we log obj1, the console will print the updated version of the object  altered on line three. &lt;/p&gt;

&lt;h2&gt;
  
  
  Pass By Value
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XJE3urc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vkedye328lo2evc4n1t7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJE3urc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vkedye328lo2evc4n1t7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple datatypes get passed to a function by value. This means that the parameter (number) copy's the value. Making the parameter independent and able to do whatever it wants with its new value plus ten. The variable number on line five is not altered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass by Reference
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S1-IRS02--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8gl7z347dncpudu9i90h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S1-IRS02--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8gl7z347dncpudu9i90h.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may wonder why obj1 isn't an empty object. Well, it was passed in by referencing the address on line ten. Jumping into the function , on line seven obj is still pointing to the same address obj1 is pointing to. At this point obj1 now has a number property with the value of seven. On line eight it gets reassigned to point to a completely different object address in memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This concept can be confusing if your just starting to code in JavaScipt but that's okay. Be patient and practice. I suggest writing code that deals with copying by value and copying by reference so you can get solidify your understanding. Especially passing values to functions ! Just remember that variables copy simple datatypes and point to complex datatypes address in memory. Thank you for reading!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
