<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nkem</title>
    <description>The latest articles on DEV Community by Nkem (@nkemdev).</description>
    <link>https://dev.to/nkemdev</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%2F518423%2F9c050230-32cb-4455-8173-d7df3874ba55.jpg</url>
      <title>DEV Community: Nkem</title>
      <link>https://dev.to/nkemdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nkemdev"/>
    <language>en</language>
    <item>
      <title>Day 22-25 of 100 Days of Code: Thinking Responsively</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Sat, 07 May 2022 20:10:08 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-22-25-of-100-days-of-code-thinking-responsively-10ao</link>
      <guid>https://dev.to/nkemdev/day-22-25-of-100-days-of-code-thinking-responsively-10ao</guid>
      <description>&lt;p&gt;I developed a 3-page responsive website using. The theme of the site is living a simple life. The site is mobile friendly using media queries and flexbox. This was a build-along project with Scrimba. You can view it &lt;a href="https://simplelicity.netlify.app/"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Day 21 of 100 Days of Code: Thinking and Coding Responsively for the Web Part 1</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Mon, 02 May 2022 17:05:00 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-21-of-100-days-of-code-thinking-and-coding-responsively-for-the-web-part-1-2b0i</link>
      <guid>https://dev.to/nkemdev/day-21-of-100-days-of-code-thinking-and-coding-responsively-for-the-web-part-1-2b0i</guid>
      <description>&lt;p&gt;Today I learnt about coding responsively for the web. Responsive Web Design is about using HTML and CSS to automatically resize, hide, shrink, or enlarge, a website, to make it look good on all devices (desktops, tablets, phones and other devices that could come up in the future). This included the view port, width, font-size, margins, padding, media queries, images and a basic introduction to flexbox.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 19 - 20 of 100 Days of Code: Dice Game App</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Wed, 27 Apr 2022 19:41:59 +0000</pubDate>
      <link>https://dev.to/nkemdev/day20-of-100-days-of-code-4a39</link>
      <guid>https://dev.to/nkemdev/day20-of-100-days-of-code-4a39</guid>
      <description>&lt;p&gt;Today I built a dice game web app with HTML, Javascript and CSS. The dice game involves two players which could be real or arbitrary. When the player clicks roll dice, it selects a random number between 1-6 as a normal dice would. Any player whose total score is greater than or equals to 20 wins the game.&lt;/p&gt;

&lt;p&gt;html snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;&amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css"&amp;gt;
        &amp;lt;link rel="stylesheet" href="index.css"&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;div class="container"&amp;gt;
            &amp;lt;h1 id="message"&amp;gt;Player 1 Turn&amp;lt;/h1&amp;gt;
            &amp;lt;div class="players"&amp;gt;
                &amp;lt;div id="player1"&amp;gt;
                    &amp;lt;h1&amp;gt;Score: 
                        &amp;lt;span id="player1Scoreboard"&amp;gt;0&amp;lt;/span&amp;gt;
                    &amp;lt;/h1&amp;gt;
                    &amp;lt;div id="player1Dice" class="dice active"&amp;gt;-&amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div id="player2"&amp;gt;
                    &amp;lt;h1&amp;gt;Score: 
                        &amp;lt;span id="player2Scoreboard"&amp;gt;0&amp;lt;/span&amp;gt;
                    &amp;lt;/h1&amp;gt;
                    &amp;lt;div id="player2Dice" class="dice"&amp;gt;-&amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;

            &amp;lt;button id="rollBtn"&amp;gt;Roll Dice 🎲&amp;lt;/button&amp;gt;
            &amp;lt;button id="resetBtn"&amp;gt;Reset Game 🔁&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;script src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;css&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html, body { 
    --color-1: #a8e6cf;
    --color-2: black; 
    --color-3: #ffd3b6; 
    --color-4: #ffaaa5; 
    --color-5: #ff8b94;
    margin: 0;
    padding: 0;
}

body {
    padding-top: 50px;
    background-image: linear-gradient(180deg, var(--color-1) , var(--color-2));
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    color: black;
}

.container {
    width: 400px;
    text-align: center;
    margin: 0 auto;
    background-color: white;
    box-shadow: -2px 6px 18px 3px rgba(0,0,0,0.75);
    padding: 50px;
}

.players {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.dice {
    border-radius: 10px;
    width: 100px;
    height: 100px;
    background-color: var(--color-3);
    margin: 0 auto;
    font-size: 80px;
    display: block;
    align-items: center;
    justify-content: center;
}


button {
    color: #fff;
    padding: 20px 30px;
    font-size: 20px;
    margin: 40px auto;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#rollBtn {
    background-color: var(--color-5);
}

#resetBtn {
    background-color: var(--color-4);
}

button:focus {
    outline: none;
}

#resetBtn {
    display: none;
}

.active {
    box-shadow: -2px 6px 18px 3px rgba(0,0,0,0.75);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Javascript snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create variables for the game state
let player1Score = 0
let player2Score = 0
let player1Turn = true

// Create variables to store references to the necessary DOM nodes
const player1Dice = document.getElementById("player1Dice")
const player2Dice = document.getElementById("player2Dice")
const player1Scoreboard = document.getElementById("player1Scoreboard")
const player2Scoreboard = document.getElementById("player2Scoreboard")
const message = document.getElementById("message")
const rollBtn = document.getElementById("rollBtn")
const resetBtn = document.getElementById("resetBtn")

function showDisplayButton() {
    rollBtn.style.display = "none"
    resetBtn.style.display = "block"
}

/* Hook up a click event listener to the Roll Dice Button. */
 rollBtn.addEventListener("click", function() {
    const randomNumber = Math.floor(Math.random() * 6) + 1

    if (player1Turn) {
        player1Score += randomNumber
        player1Scoreboard.textContent = player1Score
        player1Dice.textContent = randomNumber
        player1Dice.classList.remove("active")
        player2Dice.classList.add("active")
        message.textContent = "Player 2 Turn"
    } else {
        player2Score += randomNumber
        player2Scoreboard.textContent = player2Score
        player2Dice.textContent = randomNumber
        player2Dice.classList.remove("active")
        player1Dice.classList.add("active")
        message.textContent = "Player 1 Turn"
    }


    if (player1Score &amp;gt;= 20) {
        message.textContent = "Player 1 has won! 🥳"
        showDisplayButton()
    } else if (player2Score &amp;gt;= 20) {
        message.textContent = "Player 2 has won! 🎉"
        showDisplayButton()
    }

    player1Turn = !player1Turn
})

// 1. Hook a click event listener up with the Reset Button
// 2. Create a reset() function that resets the game
// 3. Invoke the reset() function when the Reset Button is clicked

resetBtn.addEventListener("click", function(){
    reset()
})

function reset() {
    message.textContent = "Player 1 Turn"
    player1Scoreboard.textContent = 0
    player2Scoreboard.textContent = 0
    player1Dice.textContent = '-'
    player2Dice.textContent = '-'
    player1Score = 0
    player2Score = 0
    player1Turn = true
    resetBtn.style.display = "none"
    rollBtn.style.display = "block"
    player2Dice.classList.remove("active")
    player1Dice.classList.add("active")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can view the app  &lt;a href="https://codepen.io/nkemdev/pen/NWXQaOZ"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 18 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Mon, 25 Apr 2022 19:43:14 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-18-of-100-days-of-code-ljk</link>
      <guid>https://dev.to/nkemdev/day-18-of-100-days-of-code-ljk</guid>
      <description>&lt;p&gt;Today I learnt how to build a carousel using HTML, Javascript and CSS. A carousel is a container (slideshow) of images or info that users can select by clicking a button that directs them forward or backward in the slideshow.&lt;br&gt;
HTML&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;&amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css"&amp;gt;
        &amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body class="container"&amp;gt;
        &amp;lt;div class="carousel"&amp;gt;
            &amp;lt;div class="carousel-item carousel-item-visible"&amp;gt;
                &amp;lt;img src="images/1.jpg" /&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="carousel-item"&amp;gt;
                &amp;lt;img src="images/2.jpg" /&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="carousel-item"&amp;gt;
                &amp;lt;img src="images/3.jpg" /&amp;gt;
            &amp;lt;/div&amp;gt;

            &amp;lt;div class="carousel-actions"&amp;gt;
                &amp;lt;button id="carousel-button-prev" aria-label="Previous Slidex"&amp;gt;&amp;lt;&amp;lt;/button&amp;gt;
                &amp;lt;button id="carousel-button-next" aria-label="Next Slide"&amp;gt;&amp;gt;&amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;script src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
body{
    margin:0;
    background-color: rgba(77, 66, 71, 0.21);

}
.container{
    display:flex;

    align-items:center;
    justify-content: center;
}
.carousel {
    max-width: 600px;
    position: relative;

}

.carousel .carousel-item,
.carousel .carousel-item-hidden {
    display: none;
}

.carousel .carousel-item-visible {
    display: block;
    animation: fadeVisibility 0.5s;
}

.carousel .carousel-item img {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.carousel .carousel-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel .carousel-actions button {
    border-radius: 50px;
    background-color: white;
    border: 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

.carousel .carousel-actions button#carousel-button-prev {
    margin-left: 20px;
}

.carousel .carousel-actions button#carousel-button-next {
    margin-right: 20px;   
}

@keyframes fadeVisibility {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const slides = document.getElementsByClassName('carousel-item');
let slidePosition = 0;
const totalSlides = slides.length;

document.getElementById('carousel-button-next').addEventListener('click', moveToNextSlide);
document.getElementById('carousel-button-prev').addEventListener('click', moveToPrevSlide);

function hideAllSlides() {
    for (let slide of slides) {
        slide.classList.remove('carousel-item-visible');
        slide.classList.add('carousel-item-hidden');
    }
}

function moveToNextSlide() {
    hideAllSlides();

    if (slidePosition === totalSlides - 1) {
        slidePosition = 0;
    } else {
        slidePosition++;
    }

    slides[slidePosition].classList.add("carousel-item-visible");
}

function moveToPrevSlide() {
    hideAllSlides();

    if (slidePosition === 0) {
        slidePosition = totalSlides - 1;
    } else {
        slidePosition--;
    }

    slides[slidePosition].classList.add("carousel-item-visible");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 17 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Sun, 24 Apr 2022 20:44:22 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-17-of-100-days-of-code-4k9b</link>
      <guid>https://dev.to/nkemdev/day-17-of-100-days-of-code-4k9b</guid>
      <description>&lt;p&gt;As I stated earlier in the series, I am using the Scrimba curriculum. I studied more on CSS; Specificity, Compound Selectors, inheritance and applying them.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>100daysofcode</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 15-16 of 100 days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Fri, 22 Apr 2022 20:06:04 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-16-of-100-days-of-code-4ldg</link>
      <guid>https://dev.to/nkemdev/day-16-of-100-days-of-code-4ldg</guid>
      <description>&lt;p&gt;I have been a lot slower than I wanted. I will do better. I created the invoice creator app with HTML, Javascript and CSS.&lt;br&gt;
The invoice creator app adds tasks such as washing car, mowing lawn and pullling weeds with its price attached to the button as you click it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AeWEgv_l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2eq8rysszgflp0n0bzdb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AeWEgv_l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2eq8rysszgflp0n0bzdb.jpg" alt="Image description" width="770" height="551"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"&amp;gt;
    &amp;lt;link href="invoice.css" rel="stylesheet"&amp;gt;
    &amp;lt;title&amp;gt;Invoice Creator App&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

        &amp;lt;header&amp;gt;
            &amp;lt;h2&amp;gt;Invoice Creator&amp;lt;/h2&amp;gt;
            &amp;lt;p class="heading"&amp;gt;Thanks for choosing Dynax Solutions, LLC!&amp;lt;/p&amp;gt;
        &amp;lt;/header&amp;gt;

        &amp;lt;section&amp;gt;
            &amp;lt;div class ="invoicebtns "&amp;gt;
                &amp;lt;button class="button" id="billwash"&amp;gt;Wash Car: $10&amp;lt;/button&amp;gt;
                &amp;lt;button class="button" id ="mow"&amp;gt;Mow Lawn: $20&amp;lt;/button&amp;gt;
                &amp;lt;button class="button" id ="billpull"&amp;gt;Pull Weeds: $30&amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/section&amp;gt;
      &amp;lt;section&amp;gt;
          &amp;lt;div class="task"&amp;gt;
              &amp;lt;p&amp;gt;TASK&amp;lt;/p&amp;gt;
              &amp;lt;p&amp;gt;TOTAL&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class ="bill"&amp;gt;
              &amp;lt;p id ="washCar"&amp;gt;&amp;lt;/p&amp;gt;
              &amp;lt;p id ="washCarPrice"&amp;gt;&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class ="bill"&amp;gt;
            &amp;lt;p id ="mowLawn"&amp;gt;&amp;lt;/p&amp;gt;
            &amp;lt;p id ="mowLawnPrice"&amp;gt;&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class ="bill"&amp;gt;
            &amp;lt;p id ="pullWeeds"&amp;gt;&amp;lt;/p&amp;gt;
            &amp;lt;p id ="pullWeedsPrice"&amp;gt;&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class ="bar"&amp;gt;&amp;lt;/div&amp;gt;

      &amp;lt;div class="task"&amp;gt;
        &amp;lt;p&amp;gt;NOTES&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;TOTAL  AMOUNT&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="task"&amp;gt;
        &amp;lt;p id ="typeofcollection"&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;p id="totalamount"&amp;gt;&amp;lt;b&amp;gt;$0&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;button class="sendbtn"&amp;gt;&amp;lt;i class="fa fa-envelope" aria-hidden="true"&amp;gt;&amp;lt;/i&amp;gt; Send Invoice&amp;lt;/button&amp;gt;
    &amp;lt;/section&amp;gt; 

    &amp;lt;script src ="invoice.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html,
body {
  margin: 0;
  padding: 0;


  color: black;
  font-family: Georgia, "Times New Roman", Times, serif;

  font-size: 16px;
}

header{
  background-color:#D5D4D8 ;

  text-align: center;
}
h2{
  margin-top:0;
  margin-bottom:1%;

  font-size: 50px;
  padding:50px 0 10px 0;
}
.heading
{

    font-size: 30px;
    padding-bottom:20px;
}
.invoicebtns
{   margin-top:12%;
    display:flex;
    flex-direction: row;
    justify-content: space-between;

}
.button {
    background-color: #FFFFFF; /* white */
    border: 1px solid #D5D4D8;
    color: black;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;

    font-size: 16px;
    border-radius:12px;
  }
  .button:hover {
    background-color: #D5D4D8;
  }
    section{
        margin-left: 10%;
        width:80%;
    }

  .task{
      margin-top: 2%;
      display:flex;

    color:darkgrey;


    justify-content: space-between;

    font-size: larger;
  }
  .bill
  {
      margin-top:1%;
      display:flex;
      color:black;

      justify-content: space-between;
    font-weight: bold;

  }
  .bar{


      border-top: 1px solid  #D5D4D8;
  }
 .sendbtn{
    background-color: #3770ED; /* blue*/
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    margin-bottom: 4%;
    width:90%;
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Javascript Snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This is for the object creation of the invoice
let invoice =[
    { 
        task:"Wash Car",
        bill: 10
    },
    {
        task: "Mow Lawn",
        bill: 20
    },
    {
        task: "Pull Weeds",
        bill:30
    }
]
let totalbill =[]
//fetching the value from the buton using addeventlistener
const carBtn = document.getElementById('billwash')
let  mowBtn = document.getElementById('mow')
const pullBtn = document.getElementById('billpull')
let washCar =document.getElementById('washCar')
let washCarPrice =document.getElementById('washCarPrice')
let mowLawn =document.getElementById('mowLawn')
let mowLawnPrice =document.getElementById('mowLawnPrice')
let totalamount =document.getElementById('totalamount')

let pullWeeds=document.getElementById('pullWeeds')
let pullWeedsPrice =document.getElementById('pullWeedsPrice')


 carBtn.addEventListener("click",function(){
     totalbill.push(invoice[0].bill)
     washCar.innerHTML =invoice[0].task
     washCarPrice.innerHTML =`$${invoice[0].bill}`
     carBtn.disabled =true
     totalnotes()

})

mowBtn.addEventListener("click", function(){
    totalbill.push(invoice[1].bill)
    mowLawn.innerHTML =invoice[1].task
    mowLawnPrice.innerHTML =`$${invoice[1].bill}`
    mowBtn.disabled=true
    totalnotes()
})

pullBtn .addEventListener("click",function(){
    totalbill.push(invoice[2].bill)
    pullWeeds.innerHTML =invoice[2].task
    pullWeedsPrice.innerHTML =`$${invoice[2].bill}`
    pullBtn.disabled =true
    totalnotes()
})
function totalnotes(){
    let sum = 0;

    for (let i = 0; i &amp;lt; totalbill.length; i++) {
     sum += totalbill[i];
     totalamount.textContent=`$${sum}`;

}
}

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

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 14 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Sat, 26 Mar 2022 21:28:33 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-14-of-100-days-of-code-4lkh</link>
      <guid>https://dev.to/nkemdev/day-14-of-100-days-of-code-4lkh</guid>
      <description>&lt;p&gt;This is the final part of the chrome extension build along. The concepts I learnt were&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Const&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;addEventListener()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;innerHtml&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;inputvalue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;function parameters&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Template Strings&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local Storage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON objects (JSON.Stringify &amp;amp; JSON.Parse)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Objects in arrays&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the &lt;a href="https://nkem.hashnode.dev/day-13-of-100-days-of-code"&gt;part 2&lt;/a&gt;, the extension did not have local storage so it was not persistent after the browser was closed. That means when the browser is closed, whatever data is put in the chrome extension would be gone. Hence the essence of the local storage. &lt;br&gt;
The HTML page two more buttons added to it. The Save tab and the Delete Button. The &lt;strong&gt;Save&lt;/strong&gt; button saves the value in the text box into the local storage. The &lt;strong&gt;SaveTab&lt;/strong&gt; button retrieves URL into the textbox while the &lt;strong&gt;Delete&lt;/strong&gt; button is for clearing the values in the box and the local storage. Below is the HTML snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;&amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css"&amp;gt;
        &amp;lt;link rel="stylesheet" href="index.css"&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;input type="text" id="input-el"&amp;gt;
        &amp;lt;button id="input-btn"&amp;gt;SAVE INPUT&amp;lt;/button&amp;gt;
        &amp;lt;button id="tab-btn"&amp;gt;SAVE TAB&amp;lt;/button&amp;gt;
        &amp;lt;button id="delete-btn"&amp;gt;DELETE ALL&amp;lt;/button&amp;gt;
        &amp;lt;ul id="ul-el"&amp;gt;
        &amp;lt;/ul&amp;gt;
        &amp;lt;script src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Javascript code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myLeads = []
const inputEl = document.getElementById("input-el")
const inputBtn = document.getElementById("input-btn")
const ulEl = document.getElementById("ul-el")
const deleteBtn = document.getElementById("delete-btn")
const leadsFromLocalStorage = JSON.parse( localStorage.getItem("myLeads") )
const tabBtn = document.getElementById("tab-btn")

if (leadsFromLocalStorage) {
    myLeads = leadsFromLocalStorage
    render(myLeads)
}

tabBtn.addEventListener("click", function(){    
    chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
        myLeads.push(tabs[0].url)
        localStorage.setItem("myLeads", JSON.stringify(myLeads) )
        render(myLeads)
    })
})

function render(leads) {
    let listItems = ""
    for (let i = 0; i &amp;lt; leads.length; i++) {
        listItems += `
            &amp;lt;li&amp;gt;
                &amp;lt;a target='_blank' href='${leads[i]}'&amp;gt;
                    ${leads[i]}
                &amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
        `
    }
    ulEl.innerHTML = listItems
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 13 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Sat, 19 Mar 2022 22:45:27 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-13-of-100-days-of-code-okp</link>
      <guid>https://dev.to/nkemdev/day-13-of-100-days-of-code-okp</guid>
      <description>&lt;p&gt;Today I developed a chrome extension that inputs the URL of a page that could be used to contact the lead(s) in the future. This was a code-along project.&lt;br&gt;
HTML&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     &amp;lt;link rel="stylesheet" href="index.css"&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;input type="text" id="input-el"&amp;gt;
        &amp;lt;button id="input-btn"&amp;gt;SAVE INPUT&amp;lt;/button&amp;gt;
        &amp;lt;ul id="ul-el"&amp;gt;
        &amp;lt;/ul&amp;gt;
        &amp;lt;script src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
    margin: 0;
    padding: 10px;
    font-family: Arial, Helvetica, sans-serif;
    min-width: 400px;
}

input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #5f9341;
    margin-bottom: 4px;
}

button {
    background: #5f9341;
    color: white;
    padding: 10px 20px;
    border: none;
    font-weight: bold;
}

ul {
    margin-top: 20px;
    list-style: none;
    padding-left: 0;
}

li {
    margin-top: 5px;
}

a {
    color: #5f9341;
}

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

&lt;/div&gt;



&lt;p&gt;The Javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// chrome://extensions/
let myLeads = []
const inputEl = document.getElementById("input-el")
const inputBtn = document.getElementById("input-btn")
const ulEl = document.getElementById("ul-el")

inputBtn.addEventListener("click", function() {
    myLeads.push(inputEl.value)
    inputEl.value = ""
    renderLeads()
})

function renderLeads() {
    let listItems = ""
    for (let i = 0; i &amp;lt; myLeads.length; i++) {
        listItems += `
            &amp;lt;li&amp;gt;
                &amp;lt;a target='_blank' href='${myLeads[i]}'&amp;gt;
                    ${myLeads[i]}
                &amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
        `
    }
    ulEl.innerHTML = listItems  
}

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

&lt;/div&gt;



&lt;p&gt;The JSON script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "manifest_version": 3,
    "version": "1.0",
    "name": "Leads Sales tracker",
    "action": {
        "default_popup": "index.html",
        "default_icon": "icon.png"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>10-12 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Wed, 16 Mar 2022 21:59:16 +0000</pubDate>
      <link>https://dev.to/nkemdev/10-12-of-100-days-of-code-4jkf</link>
      <guid>https://dev.to/nkemdev/10-12-of-100-days-of-code-4jkf</guid>
      <description>&lt;p&gt;I developed a static website about a mushroom company. I used html and CSS.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 9 of 100 days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Tue, 08 Mar 2022 23:42:18 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-9-of-100-days-of-code-300a</link>
      <guid>https://dev.to/nkemdev/day-9-of-100-days-of-code-300a</guid>
      <description>&lt;p&gt;Started the build-along chrome extension app with Scrimba. In the course of the build-along, I learnt about the innerHtml and using the click function apart from using the onclick function in the button. I will continue tomorrow. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 8 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Mon, 07 Mar 2022 20:30:30 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-8-of-100-days-of-code-4p10</link>
      <guid>https://dev.to/nkemdev/day-8-of-100-days-of-code-4p10</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o09157BH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrpiijd1h6tqym6t15vj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o09157BH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrpiijd1h6tqym6t15vj.png" alt="Passwordgenerator" width="880" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Went AWOL for a while. I developed a random password generator app. Learnt a little of flexbox with it. I have learnt something with this absence. It is better to do a little than none at all. At least you can build from there.&lt;/p&gt;

&lt;p&gt;The random password generator is an app that when the button is clicked, it generates four different passwords into four textboxes.&lt;/p&gt;

&lt;p&gt;The html code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;title&amp;gt;Password Generator&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;main&amp;gt;

&amp;lt;h1 class="generator-color"&amp;gt;Generate a &amp;lt;/h1&amp;gt;
&amp;lt;h1 class="generator-color2"&amp;gt;random password&amp;lt;/h1&amp;gt;
&amp;lt;p class="thirdgen"&amp;gt;Never use insecure password again&amp;lt;/p&amp;gt;


      &amp;lt;form&amp;gt;
       &amp;lt;button class ="greenbutton" type="button" onclick="genPassword()" &amp;gt;Generate Passwords&amp;lt;/button&amp;gt; 
       &amp;lt;div class ="pwds"&amp;gt;
       &amp;lt;input type="text" id="pass1" readonly&amp;gt; 
       &amp;lt;input type="text" id="pass2" readonly&amp;gt; 
       &amp;lt;input type="text" id="pass3" readonly&amp;gt; 
       &amp;lt;input type="text" id="pass4" readonly&amp;gt; 
      &amp;lt;/div&amp;gt;
      &amp;lt;/form&amp;gt;


&amp;lt;/main&amp;gt;
    &amp;lt;script src="passwordgen.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CSS file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body{
    margin:0;
    padding:0;
    background-color: #1F2937;
    width: 100%;
    font-family: "Goudy Bookletter 1911", sans-serif;

}
main{
    margin-left:6%;
    margin-top: 10%;
}
h1{
    font-size: 30px;
}
.generator-color{
    color:#FFFFFF
}
.generator-color2{
    color:#10B981;
}
.thirdgen{
    color:#D5D4D8;
    font-size: 20px;
    line-height: 28px;


}
.greenbutton{
   background-color: #10B981;
  border: none;
  border-radius: 5px;
  color: white;
  padding: 15px 15px;
  text-align: center;
  text-decoration: none;
  display: flex;
  font-size: 16px;
  margin-bottom: 5rem;;
  cursor: pointer;

}
.pwds
{
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    width:50%;

}
input{
    padding:5px;
    background-color: #273549;
    color:#10B981;
    margin-bottom: 10px;
    margin-top: 10px;
    margin-right: 10px;
    padding: 10px;
    border-style: none;
    border-radius: 25px;

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

&lt;/div&gt;



&lt;p&gt;The Javascript file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let password1=document.getElementById("pass1");
let password2=document.getElementById("pass2");
let password3=document.getElementById("pass3");
let password4=document.getElementById("pass4");

 function genPassword() {
    let chars = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&amp;amp;*()ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    let passwordLength = 12;
    let password1 = "";
    let password2 = "";
    let password3 = "";
    let password4 = "";


 for ( i = 0; i &amp;lt;= passwordLength; i++) {
   let randomNumber1 = Math.floor(Math.random() * chars.length);
   let randomNumber2 = Math.floor(Math.random() * chars.length);
   let randomNumber3 = Math.floor(Math.random() * chars.length);
   let randomNumber4 = Math.floor(Math.random() * chars.length);
   password1+= chars.substring(randomNumber1, randomNumber1 +1);
   password2+= chars.substring(randomNumber2, randomNumber2 +1);
   password3+= chars.substring(randomNumber3, randomNumber3 +1);
   password4+= chars.substring(randomNumber4, randomNumber4+1);
   if (password1 != password2 &amp;amp;&amp;amp; password1 != password3 &amp;amp;&amp;amp; password2!=password3 &amp;amp;&amp;amp; password3!=password4){
      document.getElementById("pass2").value = password2;
      document.getElementById("pass3").value = password3;
      document.getElementById("pass4").value = password4;
   }

  }
        document.getElementById("pass1").value = password1;


 }



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

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Day 7 of 100 Days of Code</title>
      <dc:creator>Nkem</dc:creator>
      <pubDate>Fri, 25 Feb 2022 20:56:35 +0000</pubDate>
      <link>https://dev.to/nkemdev/day-7-of-100-days-of-code-3mhe</link>
      <guid>https://dev.to/nkemdev/day-7-of-100-days-of-code-3mhe</guid>
      <description>&lt;p&gt;Today I started a html,CSS project to escape tutorial hell as we would say. Let me see how it goes. Let me use what I have learnt and go from there. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>devjournal</category>
      <category>html</category>
    </item>
  </channel>
</rss>
