<?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>Forem: Idukpaye Osazuwa</title>
    <description>The latest articles on Forem by Idukpaye Osazuwa (@idukpayeosazuwa).</description>
    <link>https://forem.com/idukpayeosazuwa</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%2F745050%2F17baa6ad-044e-4a83-b064-ea18486a92ca.png</url>
      <title>Forem: Idukpaye Osazuwa</title>
      <link>https://forem.com/idukpayeosazuwa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/idukpayeosazuwa"/>
    <language>en</language>
    <item>
      <title>Javascript Functions Explained to a Five-Year-Old</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Fri, 22 Dec 2023 10:40:56 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/javascript-functions-explained-to-a-five-year-old-h3f</link>
      <guid>https://forem.com/idukpayeosazuwa/javascript-functions-explained-to-a-five-year-old-h3f</guid>
      <description>&lt;h3&gt;
  
  
  The Javascript Function Sandwich
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0h4g42m1jjcy5r3m2eo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0h4g42m1jjcy5r3m2eo.png" alt="The Cover Image" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The thing about knowledge is that it is not in one place like you can read one mathematics textbook on geometry and expect to be god, different textbooks bring different things to the table. (Geometry is not easy)&lt;/p&gt;

&lt;p&gt;Anyway, in this article, we are doing the impossible by providing a comprehensive guide of functions with exercises and more, I promise even if you are a five-year-old reading this, you will learn a lot just trust me, OK.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Function???
&lt;/h2&gt;

&lt;p&gt;You have seen functions in maths and programming, right? Well, they are the same. In anywhere, a function is something that takes in &lt;strong&gt;input&lt;/strong&gt; and returns &lt;strong&gt;output&lt;/strong&gt;. What is passed into the function is called an &lt;strong&gt;argument&lt;/strong&gt;, e.g. Imagine a function that takes in 2 numbers and adds them or squares them or one that checks if you are going to follow me (that would be nice though), just imagine, a function could be ANYTHING.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming Back to Javascript?
&lt;/h2&gt;

&lt;p&gt;Now, let’s relate everything to Javascript, how do we declare functions? We can declare functions, in the simplest way using the function keyword, (Although that's not how the cool kids do it these days, we will get there.)&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="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our function is very simple, it takes two numbers &lt;strong&gt;x&lt;/strong&gt; and &lt;strong&gt;y,&lt;/strong&gt; and prints the result. (The two numbers it takes are called &lt;strong&gt;arguments&lt;/strong&gt;, bet you forgot). I know it is quite early but try to make an age calculator (basically takes in years and returns them in days)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh7m01cqoxgxujbdz6yg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh7m01cqoxgxujbdz6yg.png" alt="Why we get undefined after calling our function" width="249" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why are getting undefined from our function? well, you might know but we will come back to this later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Function Scoping ()
&lt;/h2&gt;

&lt;p&gt;Listen up, well uh I mean read up, A scope is like an environment. (Note env is the same as environment in this article)&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;followers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the default env, we assign a variable to followers and it is easily accessed from anywhere in our program. This env is called the global scope but functions have their env called the local scope and this local scope is local i.e. it is only accessible through our function and our function alone. It sounds simple but when we get to more complex stuff like closure make sure to remember this alright.&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;followers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;
    &lt;span class="c1"&gt;//One Day we will get there&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;back_to_reality&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;followers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;followers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;back_to_reality&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is the output of this code? 10000 or 6. Well, the answer is 10000 why? just kidding the answer is 6 because functions have their own environment rather scope, it only sees the followers it knows, the one which is defined inside of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions as Values
&lt;/h2&gt;

&lt;p&gt;We defined a function as something that takes in input and &lt;strong&gt;&lt;em&gt;returns&lt;/em&gt;&lt;/strong&gt; a value right? Our function isn't returning a value which is why we that undefined in the console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2eif6bcz8va3idth8fm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2eif6bcz8va3idth8fm2.png" alt="Why we get undefined after calling our function" width="249" height="129"&gt;&lt;/a&gt;&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="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember this function, well we are going to assign it to a variable and try to access it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;followers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;you&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;followers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// -&amp;gt; Result is undefined&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result is undefined, when your functions do not return anything you can’t use it as a value. On the contrary, to make our functions return a usable value that we can store in a variable, we use the return keyword.&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="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;followers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;you&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;followers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// -&amp;gt; Result is 7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Call Stack
&lt;/h2&gt;

&lt;p&gt;The Call stack is quite complicated and honestly, I do not fully understand it myself. Now, let’s imagine you had a to-do list of tasks you wanted to do, and every time you finish one task you remove tasks from the list. (unless you like working ) but what if you are doing one task like buying bread and before you buy bread you need to get money from your mom, so you get money from your mom and then buy the bread right? The Call Stack is like a to-do list for functions, look at the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;buybread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;money&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;get_money_From_Mom&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getMoney&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Bread has been brought.&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;The Call Stack when this function is called goes like this, firstly, It calls the &lt;em&gt;**buybread *&lt;/em&gt;&lt;em&gt;function and realise that hey, before I can finish this function I need to call another function (which in this case is **getMoney()&lt;/em&gt;*) and then finishes with the rest of the function.&lt;/p&gt;

&lt;p&gt;You might the wondering, why the heck am I learning this boring theory? why? well, when learning something as confusing as recursion, you will find it invaluable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Javascript Closure
&lt;/h2&gt;

&lt;p&gt;Prepare yourself this is an advanced javascript topic but we will try our best. Now, jokes apart we talked about function scoping a few minutes ago right? Now, we going to take it one step further.&lt;/p&gt;

&lt;p&gt;The Essence of that lesson was to show that a function has a scope and the variables inside it are private right? Now what happens when the function is called every time, it means, it means that those variables are, are, (complete it for me), created every time they are invoked.&lt;/p&gt;

&lt;p&gt;The fact that they are created every time brings an interesting question. What happens to the LOCAL variables when the function call that created them is no longer active? do the variables disappear? Nope! let’s take an examples&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="nf"&gt;countFollower&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;newFollower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;
            &lt;span class="c1"&gt;//closure function&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;register&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;newFollower&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; have followed Tech Upfront`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code, we do the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Assign variable newFollowerto the argument name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return a function that runs for every instance when the newFollower variable is created&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You might be saying, which instance? I did not get it. Calm down and take an example.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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;follower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;countFollower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You&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;newFollower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;countFollower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Your Friend&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;follower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nx"&gt;newfollower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;Output&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You have followed Tech Upfront&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Your Friend have followed Tech Upfront&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simply put, a closure is a function that runs on every &lt;strong&gt;instance&lt;/strong&gt; when the local variables are created. Now, when we start talking about instances don’t act confused.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exercises on Closure
&lt;/h2&gt;

&lt;p&gt;Now, honestly, I do not expect you to understand anything I have said easily, remember learning is a race, it is not about who starts it but who finishes it, do not give up on whatever you are learning! Answers are at the bottom of the article hopefully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise One: The Simple Counter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is what you are to do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Write a function that accepts a number n as an argument&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define a function, increment that runs on the INSTANCE the variable is created and the function should increment the the value of n&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;That’s all, start working.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Exercise Two: The Complex Counter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is what you are to do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Write a function that accepts a number n as an argument&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define 3 three functions: increment, decrement, and reset&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note: they should be on the INSTANCE (couldn’t stress this enough), and the variable is created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They should increase, decrease, and reset the numbers respectively.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Exercise 3: A function that accepts two numbers and picks the lower one.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise 4: A function that accepts a number and returns true only if it is an even number.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Way Cool Kids Define Functions
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Arrow Notation
&lt;/li&gt;
&lt;/ol&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="nf"&gt;addTwoNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is quite boring, it can be defined like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addTwoNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not over-react, there is nothing there, functions can be defined like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="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="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hey , i am a no name function&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;So we give the no-name function a name and suddenly we have&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;addTwoNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Recursion
&lt;/h2&gt;

&lt;p&gt;This is a complex topic, I wanted to include it in the article but sorry next time, I’m too tired and I do not want to confuse you more than I have already done. Thanks for reading, I spent two days writing this, it means a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solutions to Exercises (only 1 )
&lt;/h2&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;createCounter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&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="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;n&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="cm"&gt;/** 
     * const counter = createCounter(10)
     * counter() // 10
     * counter() // 11
     * counter() // 12
     */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the Concept of Number 1 to do Number 2 because they work on the simple principle which is closure (that INSTANCE I talked about before). Numbers 3 and 4 are basically if checks, oops I shouldn’t have said or written it.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>6 New Syntax Changes in Web Development</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sun, 20 Aug 2023 11:53:41 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/6-new-syntax-changes-in-web-development-3p6c</link>
      <guid>https://forem.com/idukpayeosazuwa/6-new-syntax-changes-in-web-development-3p6c</guid>
      <description>&lt;p&gt;Web Development has seen some interesting changes lately. HTML, CSS, and Javascript have gotten some nice updates and that's exactly what we are going to talk about in this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  A New HTML Tag
&lt;/h3&gt;

&lt;p&gt;Making Modals and pop-ups hasn't always been an easy thing to do. First, you will have a backdrop then the modal, and some hacked-up javascript and CSS. I'm happy to tell us that this new HTML makes the modal way easier. It is called the  tag and as the name suggests it is used for making dialogs.&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;dialog&lt;/span&gt; &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!---The open Attribute make it show by default 
   otherwise it is hidden ---&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Hey Guys&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;'dialog'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="c"&gt;&amp;lt;!-- We can now use a special method of dialog to close the modal--&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;'submit'&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'btn'&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Close the Modal&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dialog&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'btn'&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;I am Just a Random button&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CSS Nesting
&lt;/h3&gt;

&lt;p&gt;If you have ever used sass/scss before you will know that nesting CSS properties is such a powerful tool. Nesting allows you to style related properties e.g let's say we want to style the button with a class of '.btn' and it should only apply to the button inside the  . Well can nest it like so,&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="nt"&gt;dialog&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="err"&gt;.btn{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* Now this will only style the button inside the dialog, 
is the syntax not just clean */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Individual Transform Properties
&lt;/h3&gt;

&lt;p&gt;Back in the day transform used to look like this:&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="nc"&gt;.some-element&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;45deg&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;But now, we have Individual Transform Properties so it looks like this&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="nc"&gt;.some-element&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="py"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="py"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="py"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;45deg&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;
  
  
  Color Mixing
&lt;/h3&gt;

&lt;p&gt;It is possible to now mix two colors in CSS, using a new function. Let's say we want to mix red and yellow it goes like this:&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="nc"&gt;.some-element&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;color-mix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;srgb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c"&gt;/*The Color Will Be Orange 🍊*/&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Javascript Changes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  New Array Method
&lt;/h3&gt;

&lt;p&gt;Getting the last element in the array has been somehow weird. Let me explain, let's say we have an array like so:&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;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="cm"&gt;/*To get the first element we say*/&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&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="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="cm"&gt;/*But to Get the Last we can't say just -1 we use: */&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;arr&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;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Isn't it somehow weird right? So with the new array method, it looks like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="cm"&gt;/*First element*/&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&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="nf"&gt;at&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="cm"&gt;/*Last Element*/&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&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="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="cm"&gt;/* it allows us to use -1 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  New Immutablity Function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is the problem with this code? The problem is that if you change the &lt;code&gt;arr&lt;/code&gt; you will also change the copy as well, so it is not really a copy but a reference. To fix this you use structuredClone&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;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;structuredClone&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, this creates a real copy, and changing it does not alter the original array.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;That was the various new changes that you should be aware of. If you enjoyed this article consider supporting me on &lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;https://www.buymeacoffee.com/alex03&lt;/a&gt; otherwise make sure to like and drop a follow&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>css</category>
    </item>
    <item>
      <title>"Secret Weapons: 10 VS Code Extensions You Didn't Know You Needed"</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sat, 08 Apr 2023 22:09:31 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/secret-weapons-10-vs-code-extensions-you-didnt-know-you-needed-2k02</link>
      <guid>https://forem.com/idukpayeosazuwa/secret-weapons-10-vs-code-extensions-you-didnt-know-you-needed-2k02</guid>
      <description>&lt;p&gt;When working in visual studio code there are certain extensions that can make life easier and can make you complete a task in a short period of time. Welcome to 10 visual studio code extensions that simply make your life way easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Live Server&lt;/strong&gt;&lt;br&gt;
This is by far one of the most important extensions especially when you are just getting started with web development. It simply allows making it possible when you save your HTML file it automatically refreshes in the browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Debugger for Chrome&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one is also very useful because allows you to debug JavaScript in the Chrome browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Prettier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one has saved a lot of time. It formats and arranges your code properly so you do not have to do it manually with spaces and tabs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Path IntelliSense&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We all know that remembering file names can all be challenging well not anymore, this extension autocompletes file names for you as you type, saving you time and effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Auto Rename Tag&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are sometimes when you mistakenly a wrong HTML tag and you want to change it, you will have to rename both tags but with this extension, you rename the opening tag and it automatically renames the closing one. It feels so nice!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6 Console Ninja&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It allows see console.logs in visual studio code, you will definitely find the one useful if you are a javascript developer!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. GitLens:&lt;/strong&gt;&lt;br&gt;
 This extension makes you more efficient when working git and it is literally called git supercharged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8.React/svelte/vue/angular&lt;/strong&gt;&lt;br&gt;
You are going to need to download an extension for the framework you use, whether that being React, svelte, etc because it will massively make your life easier!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9.IntelliSense for CSS class names&lt;/strong&gt;&lt;br&gt;
This extension provides autocomplete suggestions for class names in your CSS, saving you time and effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10.npm&lt;/strong&gt;&lt;br&gt;
This extension Integrates with the npm package manager, allowing you to install and manage packages directly from Visual Studio Code.&lt;/p&gt;

&lt;p&gt;Bouns&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Frontend Mentor QR Component</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sat, 11 Feb 2023 11:50:26 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/frontend-mentor-qr-component-591</link>
      <guid>https://forem.com/idukpayeosazuwa/frontend-mentor-qr-component-591</guid>
      <description>&lt;p&gt;Hey, guys welcome to this step-by-step tutorial on how to build a preview card component. Without wasting time let's jump right into it. To get started download these starter files. Make sure you signup/signin to frontend mentor if necessary.&lt;/p&gt;

&lt;p&gt;In case you want a video tutorial: Check out mine&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/s2o--Ry1v4U"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;Getting Started with the HTML(study it carefully)`
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- displays site properly based on user's device --&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/png"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"32x32"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"./images/favicon-32x32.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Frontend Mentor | QR code component&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"./style.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!---Always good to have coontainer, it will 
help us center it!
!---&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-img"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"./images/image-qr-code.png"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-content"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

         &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt; Improve your front-end &lt;span class="nt"&gt;&amp;lt;br/&amp;gt;&lt;/span&gt; skills by building projects&lt;span class="nt"&gt;&amp;lt;/h3&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
      Scan the QR code to visit Frontend Mentor and take your coding skills                               to the next level
     &lt;span class="nt"&gt;&amp;lt;/p&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;/div&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;/div&amp;gt;&lt;/span&gt;


&lt;span class="c"&gt;&amp;lt;!--- Attribution not required!---&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* From style Guide and it's for the font */&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="sx"&gt;url("https://fonts.googleapis.com/css2family=Outfit:wght@400;700&amp;amp;display=swap")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c"&gt;/* It centers the card in the dead center */&lt;/span&gt;
&lt;span class="nc"&gt;.container&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="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&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;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* Some basic card styles */&lt;/span&gt;
&lt;span class="nc"&gt;.card&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;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*Helps us control the image*/&lt;/span&gt;
&lt;span class="nc"&gt;.card-img&lt;/span&gt; &lt;span class="nt"&gt;img&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;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* Applying a bacckground and font */&lt;/span&gt;
&lt;span class="nt"&gt;body&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="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;212&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;45%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;89%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"Outfit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.card-content&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;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card-body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;220&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;15%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;55%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;22px&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;



</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>css</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Build a CSS Preview Card Component</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sat, 10 Sep 2022 10:12:46 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/build-a-css-preview-card-component-6a2</link>
      <guid>https://forem.com/idukpayeosazuwa/build-a-css-preview-card-component-6a2</guid>
      <description>&lt;p&gt;Hey, guys welcome to this step-by-step tutorial on how to build a preview card component.&lt;br&gt;
Without wasting time let's jump right into it. To get started download these starters &lt;a href="https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa" rel="noopener noreferrer"&gt;files&lt;/a&gt;. Make sure you signup/signin to frontendmentor if necessary.&lt;/p&gt;

&lt;h4&gt;
  
  
  Getting Started with the HTML(study it carefully)
&lt;/h4&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;main&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'container'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Always Good to have a container --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'card'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- for the actual card. div--self explantory --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'left'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- space for background image. --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;'right'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h4&amp;gt;&lt;/span&gt;
              Preview
            &lt;span class="nt"&gt;&amp;lt;/h4&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;
              Gabrielle &lt;span class="nt"&gt;&amp;lt;br&amp;gt;&lt;/span&gt; Essence Eau &lt;span class="nt"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;De Parfum
            &lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
              A floral, solar and voluptuous interpretation 
              composed by Olivier Polge, 
              Perfumer-Creator for the House of CHANEL.
            &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"big-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; $149.99&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"small-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;$169.99&lt;span class="nt"&gt;&amp;lt;/span&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;button&amp;gt;&lt;/span&gt;
               &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"./images/icon-cart.svg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Add to cart
            &lt;span class="nt"&gt;&amp;lt;/button&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The CSS Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&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="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;38%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;92%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c"&gt;/*you can find the color in the style-guide.md*/&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;system-ui&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/*This set of styles will center everything in the container(in this case the card)*/&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="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&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;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.left&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;450px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="c"&gt;/*Adding the background image */&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("./images/image-product-desktop.jpg")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-position&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;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/*Rounded corners at specific locations*/&lt;/span&gt;
  &lt;span class="nl"&gt;border-top-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-bottom-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.right&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;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.card&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;600px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/*Remember that body is not white;this makes the card stand out*/&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&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="c"&gt;/*Rounded corners at specific locations*/&lt;/span&gt;
  &lt;span class="nl"&gt;border-top-right-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-bottom-right-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*The text container contains the $169.99 &amp;amp; $149.99*/&lt;/span&gt;
&lt;span class="nc"&gt;.text-container&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;align-items&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;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*Self Explanatory*/&lt;/span&gt;
&lt;span class="nt"&gt;h4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*Self Explanatory*/&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*Self Explanatory*/&lt;/span&gt;
&lt;span class="nf"&gt;#big-text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c"&gt;/*Remember that this color can be found in the style-guided.md*/&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;158&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;36%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;37%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*Self Explanatory*/&lt;/span&gt;
&lt;span class="nf"&gt;#small-text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;line-through&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c"&gt;/*when styling a button remember that the padding is very important*/&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c"&gt;/*stripping away browser defaults*/&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/*Remember the button has an Image*/&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;align-items&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;justify-content&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;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;158&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;36%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;37%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c"&gt;/*because we are giving the .right div margin:20px therefore width:80%*/&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;80%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/*Rounded Corners*/&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*The image inside the button*/&lt;/span&gt;
&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c"&gt;/*This will adjust it a lit bit */&lt;/span&gt;
  &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/*This styles will on apply to devices below 600px*/&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.card&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&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c"&gt;/*Changes the layout of the card*/&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;600px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.right&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;80%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c"&gt;/*becuase of the margin 80% not 100% for mobile*/&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;button&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="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.left&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/*changing the product image*/&lt;/span&gt;
    &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("./images/image-product-mobile.jpg")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-position&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;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
     &lt;span class="c"&gt;/*border radius configuration*/&lt;/span&gt;
    &lt;span class="nl"&gt;border-bottom-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-top-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-top-right-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&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;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;br&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="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c"&gt;/*this will make our br tags disappear*/&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;#big-text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/** Happy Coding!**/&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;IF YOU LIKED THE POST, THEN YOU CAN BUY ME MY FIRST COFFEE EVER, THANKS IN ADVANCE.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-orange.png" alt="Buy Me A Coffee" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>20+ React Libraries to Jumpstart your next project</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sat, 10 Sep 2022 10:00:13 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/20-react-libraries-to-jumpstart-your-next-project-30fd</link>
      <guid>https://forem.com/idukpayeosazuwa/20-react-libraries-to-jumpstart-your-next-project-30fd</guid>
      <description>&lt;p&gt;In the universe of npm, there are a lot of packages to choose from, so knowing which one to choose from can be very difficult. In This article, we will first look at the categories of libraries which are server-side-rendering, animation,state-management, and General Utilities and we will then look at the packages under these categories.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.General Utilities
&lt;/h4&gt;

&lt;p&gt;The npm packages in this category are just packages that are helpful so few specific tasks and you may eventually need them. The packages in this include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;moment.js -- very good for working with dates&lt;/li&gt;
&lt;li&gt;Axios -- good for handling async tasks &lt;/li&gt;
&lt;li&gt;React-hot-toast, React-toastify — handling small notifications and toasts&lt;/li&gt;
&lt;li&gt;react-icons," @mui"/icons-material  —  For icons&lt;/li&gt;
&lt;li&gt;react-paginate —  For pagination &lt;/li&gt;
&lt;li&gt;React-share — Share things Socially
&lt;/li&gt;
&lt;li&gt;React-slick, react-responsive-carousel — For Carousel &lt;/li&gt;
&lt;li&gt;clsx — For conditional classes &lt;/li&gt;
&lt;li&gt;react-intersection-observer — For intersection &lt;/li&gt;
&lt;li&gt;react-dropzone  — For file upload and drag and drop&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  2. Animation
&lt;/h4&gt;

&lt;p&gt;Bringing animation to your site just makes it more fun and pleasant for your viewers. That being said, the packages under animation include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;GSAP&lt;/li&gt;
&lt;li&gt;Framer motion&lt;/li&gt;
&lt;li&gt;React-spring&lt;/li&gt;
&lt;li&gt;Anime.js&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  3. State Management
&lt;/h4&gt;

&lt;p&gt;Sometimes the data in your React.js application can be very difficult to manage effectively and the React content API isn't just good enough. That being said, the packages under state management include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Redux&lt;/li&gt;
&lt;li&gt;Redux Toolkit -- my personal favourite&lt;/li&gt;
&lt;li&gt;Recoil&lt;/li&gt;
&lt;li&gt;Mobx&lt;/li&gt;
&lt;li&gt;React Context -- not recommended for big projects&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  4. server-side rendering
&lt;/h4&gt;

&lt;p&gt;if you are building a highly optimized robust website you will need an SSR framework because they make routing easier, they fetch data on the server and return to the component, they optimize images so it doesn't bottleneck performance, and much more. That being said, the packages under server-side rendering include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Next.js&lt;/li&gt;
&lt;li&gt;Gatsby.js -- for only SSG (static site generation)&lt;/li&gt;
&lt;li&gt;Remix&lt;/li&gt;
&lt;/ol&gt;

&lt;h5&gt;
  
  
  Conclusion
&lt;/h5&gt;

&lt;p&gt;if you enjoyed please do not forget to drop a follow and a reaction and follow me. &lt;strong&gt;IF YOU LIKED THE POST, THEN YOU CAN BUY ME MY FIRST COFFEE EVER, THANKS IN ADVANCE.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-orange.png" alt="Buy Me A Coffee" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>npm</category>
      <category>webdev</category>
    </item>
    <item>
      <title>10 React Principles, Concepts Every React developer Must know</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Sat, 10 Sep 2022 08:55:36 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/10-react-principles-concepts-every-react-developer-must-know-3549</link>
      <guid>https://forem.com/idukpayeosazuwa/10-react-principles-concepts-every-react-developer-must-know-3549</guid>
      <description>&lt;p&gt;React is not easy; there are so many concepts and principles to know. Welcome to 10 React concepts, terms, and principles every React developer Must know. &lt;/p&gt;

&lt;h4&gt;
  
  
  1. create-react-app
&lt;/h4&gt;

&lt;p&gt;This is one of the most popular ways to get started with a React application. This is quite a CLI; it is more advanced than you think but basically, this is how we create a new application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-app &lt;span class="o"&gt;[&lt;/span&gt;name of your app] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;as a bonus; if you want to add typescript, it's really simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-app &lt;span class="o"&gt;[&lt;/span&gt;name of your app] &lt;span class="nt"&gt;--template&lt;/span&gt; typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As I previously said, there is way more to it. Check out their official &lt;a href="https://create-react-app.dev/" rel="noopener noreferrer"&gt;documention&lt;/a&gt;.&lt;br&gt;
Once you've created a new React app you wil start writing something called JSX instead of HTML.&lt;/p&gt;
&lt;h4&gt;
  
  
  2. JSX
&lt;/h4&gt;

&lt;p&gt;This stands for Javascript and XML. It is basically a way for us to insert javascript and dynamic values into our HTML. JSX is the fundamental thing that makes React a declarative framework. Now you know what JSX is, you are ready to start creating components. &lt;/p&gt;
&lt;h4&gt;
  
  
  3. Class-based Components
&lt;/h4&gt;

&lt;p&gt;These are the old kind of components (introduced in React 16.8); they use classes to define components.&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;class&lt;/span&gt; &lt;span class="nc"&gt;Clock&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// Application Code //&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Clock&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem with the class-based components is that they are deprecated and very hard to learn for beginners. This brings us to another type of component.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Functional Component
&lt;/h4&gt;

&lt;p&gt;These components are defined by a simple function and are more modern to write (introduced in React 17).&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="nf"&gt;clock&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="c1"&gt;// application data //&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Clock&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These components are easier and cleaner to write, but there is one just big limitation. Functional components by themselves can not do most of the &lt;strong&gt;important&lt;/strong&gt; things class-based components can do such as store state etc. This brings us to another concept.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Hooks
&lt;/h4&gt;

&lt;p&gt;Because functional components can't do most of the things a class-based component can do such as hold data and etc. Hooks are a way to extend the functionality of a functional component. The most important one is -- which is yet another concept.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. &lt;code&gt;useState&lt;/code&gt; hook
&lt;/h4&gt;

&lt;p&gt;This is undoubtedly the most important React hook, In fact, functional components are useless without them. Its function is to create state(which is reactive data) for functional components.&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="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;sampleState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;setSampleState&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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 am a sample state&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;The usestate hook by itself is not totally complete. So it is frequently used with another hook.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. &lt;code&gt;useEffect&lt;/code&gt; hook
&lt;/h4&gt;

&lt;p&gt;That hook is no other than the useEffect hook. This hook is very confusing, but it's basically used to run code on a specific condition.&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="nf"&gt;useEffect&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="c1"&gt;// some logic&lt;/span&gt;
&lt;span class="p"&gt;},[&lt;/span&gt;&lt;span class="nx"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  8. props
&lt;/h4&gt;

&lt;p&gt;Now we've looked at how components store internal data(useState); let's look at how components share data with each other; Well, they do so using props. Let's briefly look at how they work.&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="nf"&gt;body&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;nav&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// the color is the prop&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// now let's receive that data inside the nav component&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;nav&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt; &lt;span class="c1"&gt;// destructing is possible but let's keep it simple&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  9. Higher-Order-Component
&lt;/h4&gt;

&lt;p&gt;A higher-order component is an advanced technique in React that is used for supercharging and reusing components. it takes a component as its argument and returns something else&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;EnhancedComponent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;higherOrderComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;WrappedComponent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  10. key
&lt;/h4&gt;

&lt;p&gt;To render a list of data effectively; we assign a unique ID to each item in the list. That is called a key.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;I really hope you enjoyed the article and found it useful if so, please leave a reaction and comment down your own unique React Concept&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 JS Concepts you should know before Learning React</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Tue, 06 Sep 2022 18:41:36 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/5-js-concepts-you-should-know-before-learning-react-1318</link>
      <guid>https://forem.com/idukpayeosazuwa/5-js-concepts-you-should-know-before-learning-react-1318</guid>
      <description>&lt;p&gt;Reactjs is by far one of the most popular javascript frameworks to learn in 2022, but for you to learn Reactjs(or any other JS framework) you need the following prerequisites. The basic ones are HTML, CSS, and JS(obviously) but in this article, we are going to go one step further and look at what you exactly need to know in Javascript to grasp Reactjs properly, easily, and efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Array Methods
&lt;/h3&gt;

&lt;p&gt;Arrays are one of the most important ways of storing data in javascript; hence there are so many array methods. In React,(or any javascript framework) arrays methods are used all time, knowing them earlier will give you a strong foundation in Javascript and React. Array methods you should know:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The map Array method -- very common&lt;/li&gt;
&lt;li&gt;The filter Array method -- very common&lt;/li&gt;
&lt;li&gt;The find Array method&lt;/li&gt;
&lt;li&gt;The reduce Array method&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do not worry if you do not know all these array methods. Check out &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" rel="noopener noreferrer"&gt;MDN&lt;/a&gt; to help out.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Async Javascript and promises
&lt;/h3&gt;

&lt;p&gt;This one is also equally important. In React(or any other javascript framework), you may be required to make requests to a server and that's where async Javascript comes in. Make sure to learn async and await, which is just a new syntax (ES8) that makes writing async javascript easier and cleaner.&lt;/p&gt;

&lt;p&gt;Helpful articles to learn Async Javascript&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.geeksforgeeks.org/async-await-function-in-javascript/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
or try out this nice video &lt;a href="https://www.youtube.com/playlist?list=PL4cUxeGkcC9jx2TTZk3IGWKSbtugYdrlu" rel="noopener noreferrer"&gt;series&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Proper Understanding of Destructing
&lt;/h3&gt;

&lt;p&gt;This is used a lot in React for things like hooks and etc. Destructing is just basically a way to unpack values from arrays into distinct variables. Consider this example:&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="c1"&gt;//Array destructing&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numbers&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// expected output:1&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// expected output:2&lt;/span&gt;
&lt;span class="c1"&gt;//Object destructing&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;a&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="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numbers&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// expected output:1&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// expected output:2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In array destructing, what happens was that we made an array of numbers and destructed the values into the variables a and b, and the same is true for object destructing. That was a brief and basic tutorial to destructing.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Functions
&lt;/h3&gt;

&lt;p&gt;You might be reading this and thinking "I already know functions".Functions are way more complicated than you think, but for you to learn React you do not need a crazy knowledge of functions. Make sure you understand arrow functions &lt;strong&gt;properly&lt;/strong&gt; because they are used a lot. If you don't, check out this MDN post to help you &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions" rel="noopener noreferrer"&gt;out&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. ESM Modules
&lt;/h3&gt;

&lt;p&gt;This is not that important but it is still worth learning. ESM Modules is just a cleaner and easier way of importing your files and other stuff in your Javascript apps. ESM Modules is available to vanilla javascript; so it is not special to any javascript framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Those are the concepts that I recommend you learn before learning any javascript framework in my opinion. If you enjoyed it, please leave a reaction, follow me for more, and support &lt;a href="https://buymeacoffee/alex03" rel="noopener noreferrer"&gt;me&lt;/a&gt; if possible. Thank you for reading! &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Progressive Web Apps: Let’s Make Something Installable</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Tue, 06 Sep 2022 18:32:11 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/progressive-web-apps-lets-make-something-installable-2p9m</link>
      <guid>https://forem.com/idukpayeosazuwa/progressive-web-apps-lets-make-something-installable-2p9m</guid>
      <description>&lt;h3&gt;
  
  
  A Website with The Right Vitamins
&lt;/h3&gt;

&lt;h3&gt;
  
  
  What is a PWA
&lt;/h3&gt;

&lt;p&gt;A Progressive Web App(PWA) is a type of application that exhibits native app-like features, A PWA is installable and has offline support and it is fast than noarmal. A PWA, as I like it to say is a website with all the right vitamins. In this tutorial, we will build a simple PWA that is installable and can work offline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s Get Started
&lt;/h3&gt;

&lt;p&gt;So create an index.html file, and in the head tag gives it a special link tag to a manfest.json file — we need to file to tell the browser that this is a PWA. I am using materlize.css so I get a nice navbar style.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsabsycttsnvib4r8es2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsabsycttsnvib4r8es2u.png" alt="index.html" width="640" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need some icons at least these sizes, 192*192,512*512, or else you can’t have a PWA. Therefore in the manfest.json file let’s fill in the necessary configurations for our PWA.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t1jaxh3beobfpb4e9rl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t1jaxh3beobfpb4e9rl.png" alt="manifest.json" width="565" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s break it Down!
&lt;/h3&gt;

&lt;p&gt;The ‘&lt;strong&gt;&lt;em&gt;name&lt;/em&gt;&lt;/strong&gt;’ property is the name of the application, the description is simply the description of the app, while we have an array of our different icons, (192*192,512*512). The ‘&lt;strong&gt;start_url&lt;/strong&gt;’ is where the application will start from, The ‘&lt;strong&gt;&lt;em&gt;display&lt;/em&gt;&lt;/strong&gt;’ property is how we want our app to be displayed — it is set to standalone which means it opens without the browser. Finally, the ‘&lt;strong&gt;&lt;em&gt;theme_color&lt;/em&gt;&lt;/strong&gt;’ is simply the color of the borders of the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Registering A Service Worker
&lt;/h3&gt;

&lt;p&gt;What we have to do next is to register a service worker; when we register a service worker we can stop requests and cache files for offline use. ServiceWorkders run on a separate javascript thread, and they are very powerful, so we can only use them on &lt;a href="https://," rel="noopener noreferrer"&gt;**https://&lt;/a&gt;,**but the only exception is localhost. In the main.js, which I linked up to the index.html, that is where we will register the service-worker.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fled81vthv3yyvatfs63u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fled81vthv3yyvatfs63u.png" alt="main.js" width="640" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So make a file called sw.js. Then, we are going to make an array of the files we want to cache for offline use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpubrhsae33drux6w1hq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpubrhsae33drux6w1hq.png" alt="sw.js" width="640" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Service-workers have a life cycle, they don’t just run for every page refresh, they are installed and activated. So let’s cache all our important files for offline use to do this let’s listen for the install event.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cdtdeu7hpb6q0g88ic8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cdtdeu7hpb6q0g88ic8.png" alt="sw.js" width="640" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So what are doing is simply listening for the install event, and self is automatically available to us, because this is a registered service-worker file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xjevqu4zrardb3d7p9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xjevqu4zrardb3d7p9k.png" alt="final.jpge" width="640" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now, we listen for the fetch event, and we try to respond with what is in the cache or we default fetch that request. That is it. By now, you should have a fully functional installable PWA. Thank you for reading.&lt;/p&gt;

&lt;h4&gt;
  
  
  PS
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;IF YOU LIKED THE POST, THEN YOU CAN BUY ME MY FIRST COFFEE EVER, THANKS IN ADVANCE.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-orange.png" alt="Buy Me A Coffee" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>pwa</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is the difference between SSR, ISR, CSR, SSG</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Tue, 30 Aug 2022 14:32:43 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/what-is-the-difference-between-ssr-isr-csr-ssg-2g9p</link>
      <guid>https://forem.com/idukpayeosazuwa/what-is-the-difference-between-ssr-isr-csr-ssg-2g9p</guid>
      <description>&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;SSR, ISR, CSR, and SSG are called rendering modes because they are the different ways in which web apps render each other. In this article, we will look at each of them in detail and talk about the type of web technology/framework utilizing each of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSR
&lt;/h3&gt;

&lt;p&gt;CSR stands for Client Side Rendering. It is a process where the page is loaded on the client's browser rather than on the server. CSR is a rendering mode in which the browser sends a request to the server and the server responds by sending an empty HTML page with only a reference to your JavaScript bundle and your CSS styles.CSR apps are called Single Paged Applications&lt;/p&gt;

&lt;h4&gt;
  
  
  How does CSR work?
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initial Request from the browser&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The server responds by sending back an empty HTML page with only a reference to your JavaScript bundle and your CSS styles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser then starts downloading the JavaScript of the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser then executes the JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The page is now interactive.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Advantages of using CSR
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Mobile app feel -due to the navigation performance of the app; it has a mobile app feel&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Great with Progressive Web Apps - Client Side Rendered applications work great with PWAs because the code can be entirely rendered on the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quicker navigation of the website - CSR offers quicker navigation between pages because no new HTML file has to be downloaded&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Main disadvantages of using CSR
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Not good for SEO - CSR is not good for SEO because it takes time to convert JavaScript to HTML, and also because the response gotten from the server is an empty HTML page with only a reference to a JavaScript bundle and CSS styles.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  When to use CSR
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;When your application has large and dynamic data.&lt;/li&gt;
&lt;li&gt;When your application has a very complex UI with many pages / features.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Examples of Client-Side Frameworks
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;React&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Angular&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  SSR
&lt;/h3&gt;

&lt;p&gt;SSR stands for Server Side Rendering. SSR is a procedure where rendering is executed by the server. It is a rendering mode in which the client sends a request to the server and instead of the server delivering an empty HTML page, it responds by delivering a fully populated HTML page.&lt;/p&gt;

&lt;p&gt;The server will serve the page on demand every single time meaning the HTML is generated on each request.&lt;/p&gt;

&lt;h4&gt;
  
  
  How does SSR work
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Request is sent to the web server by the client.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser then connects to the server, which already has the pre-rendered HTML and CSS code for the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The server then responds by sending back a fully occupied HTML page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser then downloads the JavaScript of the page which is readily available on the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser then executes the JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The page is now fully loaded and interactive.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Advantages of using SSR
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Good for SEO - Since Server Side Rendered pages have a faster initial page load time, search engine bots can crawl and index pages very well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazing User Experience - Since SSR pages have a faster initial page load time, they provide a good user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No slow internet connection barrier - If a user has a slow internet connection, he/she can view the rendered HTML page while the JavaScript is processing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Main disadvantages of using SSR
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Server cost - SSR applications often need bigger and powerful servers to provide high performances which often lead to high expenses in acquiring and maintaining the servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The complexity of deployment and hosting  - Configuring your app to work in a different environment on a server can be difficult&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Slow page transitions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  When to use SSR
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When you want good SEO performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you want faster data transmission.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you have dynamic content.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Examples of Server Side Frameworks
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;NuxtJs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NextJs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SvelteKit&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  SSG
&lt;/h3&gt;

&lt;p&gt;SSG stands for Static Site Generator. SSG is a tool that generates a full static HTML website on a CDN(content-delivering network).In SSG the HTML is generated at build time.&lt;/p&gt;

&lt;h4&gt;
  
  
  How SSG works
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;At build time before the content reaches the CDN, a SSG or Framework reads content from the files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The content then gets rendered to HTML based on templates and served to the CDN.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The results are then saved in a directory and laid out to match the source files and keep them available when requests to view the contents are made.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Advantages of using SSG
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Blazingly fast - Statically generated websites are blazingly fast because the content of your website is generated as HTML files ahead of time. When a user comes to your application and requests for a certain page, the server will quickly respond and serve it. It doesn't have to generate any HTML, it just serves it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Easiest to Host.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Great SEO performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Main disadvantages of using SSG
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Build time - The biggest penalty of SSG is the build time because once the pages are published, the only way to update them is by building the application again which might take some time.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  When to use SSG
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When you have a lot of static content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you want good SEO performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you want a fast website.&lt;/p&gt;
&lt;h4&gt;
  
  
  Examples of SSG Frameworks
&lt;/h4&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NuxtJs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NextJs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gatsby&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  ISR
&lt;/h3&gt;

&lt;p&gt;ISR stands for Incremental Static Regeneration. It is a rendering mode that uses static generation on a per-page basis without needing to build the entire site.&lt;/p&gt;

&lt;h4&gt;
  
  
  Examples of frameworks with ISR capabilities
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;NuxtJs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NextJs&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;I hope you enjoyed it! if you want to support me, please follow me or buymeacoffee &lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;here&lt;/a&gt; Thanks! Have a nice day &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>10+ digital skills in 2022 to get you a job</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Mon, 22 Aug 2022 22:10:26 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/10-digital-skills-in-2022-to-get-you-a-job-45f6</link>
      <guid>https://forem.com/idukpayeosazuwa/10-digital-skills-in-2022-to-get-you-a-job-45f6</guid>
      <description>&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;The world is turning out to be increasingly cutting-edge, and the interest in digital skills is ascending too; because we live in a digital period. There are countless digital skills out there in 2022, yet in this article, we will take a look at 5 digital skills that can get you a job, thus some honorable notices to learn in 2022.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Coding
&lt;/h4&gt;

&lt;p&gt;Coding means building applications or software. The Average Salary of a programmer varies basically by the programming language he/his uses. Coding isn’t that hard, it’s just about solving problems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty&lt;/strong&gt;: Anyone can start (even young children)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computing Resources&lt;/strong&gt;: not much needed, but will increase as you get proficient(min:4GB ram).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where can I start&lt;/strong&gt;: Trying Learning Web-development(Javascript)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How can I start:&lt;/strong&gt; By watching YouTube videos, or buying a paid course online&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When will I get a Job&lt;/strong&gt;: if you are serious; about 6 months, or else 1 to 2ys&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  2. Video Editing
&lt;/h4&gt;

&lt;p&gt;Video editing simply means using a computer application to improve other people's videos, and making them better.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty&lt;/strong&gt;: Easy, but varies on the type of software, some are hard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computing Resources&lt;/strong&gt;: Very much needed, because it deals with graphics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How can I start&lt;/strong&gt;: By watching YouTube videos, or buying a paid course online&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When will I get a Job&lt;/strong&gt;: if you are serious; about 3 months, or else 0.5 to 1yrs&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  3. Digital Marketing
&lt;/h4&gt;

&lt;p&gt;Digital marketing involves promoting products or services over the internet using technologies over the internet. There are so many chapters in digital marketing as affiliate marketing or email marketing but do our research to know the difference.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty&lt;/strong&gt;: It’s not easy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computing Resources&lt;/strong&gt;: very little needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How can I start&lt;/strong&gt;: Google Digital Garage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When will I get a Job&lt;/strong&gt;: It Depends&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  4. Graphics Designing (UX, UI)
&lt;/h4&gt;

&lt;p&gt;This means designing the interface for software applications, hence it is also called user-experience; user-interface:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty&lt;/strong&gt;: Easy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computing&lt;/strong&gt; &lt;strong&gt;Resources&lt;/strong&gt;: Very much needed, because it deals with graphics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How can I start: By watching&lt;/strong&gt; YouTube videos, or buying a paid course online&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When will I get a Job&lt;/strong&gt;: if you are serious; about 3 months, or else 0.5 to 1yrs&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  5. Content Creation
&lt;/h4&gt;

&lt;p&gt;This digital skill is unique. It requires knowing one or more digital skills in this list and making content on it(which could be writing articles or making YouTube videos). I am a content creator and I create tech-related content.&lt;/p&gt;

&lt;p&gt;Remember that you do not need a crazy level of proficiency to create content about something, and it can make you popular on the Internet. You do not need a skill to be a content creator, you can use your creativity to create something useful or funny to watch or read.&lt;/p&gt;

&lt;h4&gt;
  
  
  Honorable Mentions
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Copywriting&lt;/li&gt;
&lt;li&gt;SEO &amp;amp;&amp;amp; SEO Marketing&lt;/li&gt;
&lt;li&gt;Data Science&lt;/li&gt;
&lt;li&gt;Data Analytics&lt;/li&gt;
&lt;li&gt;Data Science&lt;/li&gt;
&lt;li&gt;Data visualization&lt;/li&gt;
&lt;li&gt;Social Media Marketing&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;There you have it! those there are the best digital skills to learn in 2022. Thanks for reading, and please leave a reaction and/or follow me or buymeacoffee  &lt;a href="https://www.buymeacoffee.com/alex03" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Have a nice day!&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I discovered that the text-editor Atom was built with Electron but no protons</title>
      <dc:creator>Idukpaye Osazuwa</dc:creator>
      <pubDate>Tue, 16 Aug 2022 10:09:42 +0000</pubDate>
      <link>https://forem.com/idukpayeosazuwa/i-discovered-that-the-text-editor-atom-was-built-with-electron-but-no-protons-10c5</link>
      <guid>https://forem.com/idukpayeosazuwa/i-discovered-that-the-text-editor-atom-was-built-with-electron-but-no-protons-10c5</guid>
      <description></description>
      <category>javascript</category>
      <category>electron</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
