<?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: Achilonu Chinwendu Faustina</title>
    <description>The latest articles on DEV Community by Achilonu Chinwendu Faustina (@chinwendufausty).</description>
    <link>https://dev.to/chinwendufausty</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%2F930133%2Feca0edcc-b024-4448-aba2-9974376ac8a5.jpg</url>
      <title>DEV Community: Achilonu Chinwendu Faustina</title>
      <link>https://dev.to/chinwendufausty</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chinwendufausty"/>
    <language>en</language>
    <item>
      <title>Mastering Conditional Statements, Loops, and FizzBuzz in JavaScript</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Thu, 14 Dec 2023 14:23:56 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/mastering-conditional-statements-loops-and-fizzbuzz-in-javascript-15je</link>
      <guid>https://dev.to/chinwendufausty/mastering-conditional-statements-loops-and-fizzbuzz-in-javascript-15je</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Introduction
2.0  Understanding Conditional Statements&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;2.1. Basic Conditional Statement&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2.2. Nested Conditional Statements&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.0  FizzBuzz: A Fun Programming Exercise&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;3.1. The FizzBuzz Function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;3.2. Using For Loop for FizzBuzz&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;3.3. Leveraging While Loop for FizzBuzz&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4.0  Exploring For Loops&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;4.1. Basic For Loop Example&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;4.2. Applying For Loop to FizzBuzz&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5.0  Unraveling While Loops&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;5.1. Basic While Loop Example&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;5.2. Adapting While Loop for FizzBuzz&lt;br&gt;
6.0  Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;JavaScript is a versatile programming language with powerful features, and understanding conditional statements and loops is essential for effective programming. In this article, we'll dive into the basics of conditional statements and explore how to use them in practical examples. Additionally, we'll unravel the popular FizzBuzz problem using different loop structures.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Understanding Conditional Statements
&lt;/h2&gt;

&lt;p&gt;Conditional statements are crucial for decision-making in programming. The else-if statement allows you to chain multiple conditions, providing alternative code blocks to execute based on different scenarios. Let's break down the provided code example that evaluates your last score and provides feedback on your performance for a better understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.1 Basic Conditional Statement
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var score = prompt("enter your last score");

if (score &amp;gt; 50 &amp;amp;&amp;amp; score &amp;lt;= 80) {
    alert("well above average");
} else if (score &amp;gt; 80 &amp;amp;&amp;amp; score &amp;lt;= 90) {
    alert("Excellent performance");
} else if (score &amp;gt; 100) {
    alert("You are a genius");
} else {
    alert("You need to work harder");
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Interpretation&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If the score is between 50 and 80, the alert will display "Well above average."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the score is between 80 and 90, the alert will display "Excellent performance."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the score is above 100, the alert will praise with "You are a genius."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If none of the above conditions are met, the default is "You need to work harder."&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.2 Nested Conditional Statements
&lt;/h2&gt;

&lt;p&gt;Nested conditional statements allow for more complex decision-making. In the FizzBuzz examples, you'll see nested conditions based on divisibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  3 FizzBuzz: A Fun Programming Exercise
&lt;/h2&gt;

&lt;p&gt;FizzBuzz is a classic programming problem that involves printing numbers from 1 to 100. For multiples of 3, print "Fizz"; for multiples of 5, print "Buzz"; and for numbers divisible by both 3 and 5, print "FizzBuzz."&lt;/p&gt;

&lt;h2&gt;
  
  
  3.1 The FizzBuzz Function
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var output = []
var count = 1;

function fizzbuzz(){
    if(count % 3 ===0 &amp;amp;&amp;amp; count % 5 === 0){
        output.push("fizzbuzz")
    }
    else if(count % 5 === 0){
        output.push("buzz")
    }
    else if(count % 3 === 0){
        output.push("fizz")
    }

    else{
        output.push(count);
    }
        count++
        console.log(output)


}
fizzbuzz()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, the fizzbuzz function generates an output array based on the FizzBuzz logic. Numbers are pushed into the array unless they are divisible by 3, 5, or both, in which case "Fizz," "Buzz," or "FizzBuzz" is pushed, respectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.2 Using For Loop for FizzBuzz
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function fizzBuzz(){
    for(count =1; count&amp;lt;=100; count++){
        if(count % 3 ===0 &amp;amp;&amp;amp; count % 5 === 0){
            output.push("fizzbuzz")
        }
        else if(count % 5 === 0){
            output.push("buzz")
        }
        else if(count % 3 === 0){
            output.push("fizz")
        }

        else{
            output.push(count);
        }

    }

        console.log(output)
}
fizzBuzz()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Utilizing a for loop, this code efficiently generates the FizzBuzz sequence and logs the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.3  Leveraging While Loop for FizzBuzz
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var output = []
function fizzBuzz(){
    while(count &amp;lt;= 100){
        if(count % 3 ===0 &amp;amp;&amp;amp; count % 5 === 0){
            output.push("fizzbuzz")
        }
        else if(count % 5 === 0){
            output.push("buzz")
        }
        else if(count % 3 === 0){
            output.push("fizz")
        }

        else{
            output.push(count);
        }
            count++
    }

        console.log(output)
}
fizzBuzz()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, a while loop achieves the same FizzBuzz result through a different iteration approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Exploring For Loops
&lt;/h2&gt;

&lt;p&gt;For loops are excellent for iterating over a sequence of numbers or elements. Let's explore a basic example and apply it to the FizzBuzz problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.1 Basic For Loop Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (y = 0; y &amp;lt; 5; y++) {
    console.log(y);
}

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

&lt;/div&gt;



&lt;p&gt;This simple for loop prints numbers from 0 to 4.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.2 Applying For Loop to FizzBuzz
&lt;/h2&gt;

&lt;p&gt;By integrating a for loop into FizzBuzz, we efficiently generate the sequence without explicitly incrementing the counter.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.  Unraveling While Loops
&lt;/h2&gt;

&lt;p&gt;While loops continue iterating until a specified condition is false. Let's examine a basic while loop and adapt it for FizzBuzz.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.1 Basic While Loop Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var x = 1;
while (x &amp;lt; 5) {
    console.log(x);
    x++;
}

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

&lt;/div&gt;



&lt;p&gt;This while loop prints numbers from 1 to 4.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.2 Adapting While Loop for FizzBuzz
&lt;/h2&gt;

&lt;p&gt;The while loop seamlessly accommodates the FizzBuzz logic, providing an alternative approach to the problem as shown in 3.3.&lt;/p&gt;

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

&lt;p&gt;Mastering conditional statements and loops is fundamental to becoming proficient in JavaScript programming. Through practical examples like the FizzBuzz problem, you've gained insights into applying these concepts in real-world scenarios. Continue experimenting and honing your skills to become a more adept JavaScript developer. Happy Christmas!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Understanding Functions and Methods in JavaScript</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Wed, 13 Dec 2023 11:35:44 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/understanding-functions-and-methods-in-javascript-447c</link>
      <guid>https://dev.to/chinwendufausty/understanding-functions-and-methods-in-javascript-447c</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Functions in JavaScript&lt;br&gt;
a. Declaration and Syntax&lt;br&gt;
b. Parameters and Return Values&lt;br&gt;
c. Scope&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Methods in JavaScript&lt;br&gt;
a. Definition and Usage&lt;br&gt;
b. Invoking Methods&lt;br&gt;
c. Context Binding&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Differences Between Functions and Methods&lt;br&gt;
a. Context&lt;br&gt;
b. Invocation&lt;br&gt;
c. Usage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;JavaScript, as a versatile and dynamic programming language, relies heavily on functions and methods for executing tasks and managing data. While both functions and methods play crucial roles in JavaScript, they differ in their definitions, usage, and invocation.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Functions in JavaScript
&lt;/h2&gt;

&lt;p&gt;a. Declaration and Syntax&lt;br&gt;
In JavaScript, a function is a reusable block of code designed to perform a specific task. Functions can be declared using the function keyword, followed by a name and a block of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function greet(name) {
    console.log(`Hello, ${name}!`);
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  b. Parameters and Return Values
&lt;/h2&gt;

&lt;p&gt;Functions can accept parameters, enabling dynamic behavior based on inputs. Additionally, they can return values to the calling code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add(a, b) {
    return a + b;
}

let result = add(3, 5); // result is now 8

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  c. Scope
&lt;/h2&gt;

&lt;p&gt;Functions in JavaScript have their own scope, meaning variables declared within a function are local to that function and do not affect the outer scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Methods in JavaScript
&lt;/h2&gt;

&lt;h2&gt;
  
  
  a. Definition and Usage
&lt;/h2&gt;

&lt;p&gt;Methods are functions that are associated with objects. In JavaScript, objects have properties and methods. Methods are functions defined as properties of an object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let car = {
    brand: 'Toyota',
    model: 'Camry',
    start: function() {
        console.log('Engine started.');
    }
};

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  b. Invoking Methods
&lt;/h2&gt;

&lt;p&gt;Methods are invoked using the dot notation on the object they belong to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;car.start(); // Outputs: Engine started.

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  c. Context Binding
&lt;/h2&gt;

&lt;p&gt;One crucial aspect of methods is that they have a reference to the object they belong to. This reference is often referred to as the 'this' keyword, which points to the object instance when the method is invoked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let person = {
    name: 'John',
    greet: function() {
        console.log(`Hello, ${this.name}!`);
    }
};

person.greet(); // Outputs: Hello, John!

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Differences Between Functions and Methods
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;a. Context&lt;/strong&gt;&lt;br&gt;
Functions are standalone entities, while methods are associated with objects and have a context (this) tied to the object.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b. Invocation&lt;/strong&gt;&lt;br&gt;
Functions are invoked independently, whereas methods are called on objects using dot notation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c. Usage&lt;/strong&gt;&lt;br&gt;
Functions are general-purpose, while methods are specific to the objects they are attached to, often operating on the object's data.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Conclusion
&lt;/h2&gt;

&lt;p&gt;Understanding the distinctions between functions and methods in JavaScript is fundamental to writing effective and organized code. Functions provide modularity and code reusability, while methods bring a level of organization and encapsulation within objects. By comprehending their differences, developers can leverage both functions and methods efficiently to build robust and maintainable JavaScript applications.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CODE DESCRIPTION/REVIEW</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Sat, 18 Feb 2023 02:10:22 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/code-descriptionreview-3ck4</link>
      <guid>https://dev.to/chinwendufausty/code-descriptionreview-3ck4</guid>
      <description>&lt;p&gt;The capacity to practice and provide a description or review of codes gives you an advantage in your learning process  and also a chance to improve.&lt;br&gt;
I'll be giving a description of blocks of code today, and I've shared pictures of them below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgtq7zh8yjsmc4frx078.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgtq7zh8yjsmc4frx078.PNG" alt="Image description" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe9ln9qt03qj5z7bz6vo5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe9ln9qt03qj5z7bz6vo5.PNG" alt="Image description" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following id were grabbed from html:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;add-item-btn&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;item-input&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;list.&lt;br&gt;
An EventListener was added to the addItemBtn such that when triggered, the function at the eventListener pushes the value typed in the ItemInput into the shoppingList which was given an empty array. Again it calls out the render function (render() ) while the render function (function render() ) iterates through the array and creates html for each item on the shoppingList.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>login</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>DAY 10 OF CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Fri, 30 Sep 2022 20:16:02 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-10-of-code-challenge-4e18</link>
      <guid>https://dev.to/chinwendufausty/day-10-of-code-challenge-4e18</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;VALID NUMBER&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DESCRIPTION OF QUESTION&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A valid number can be split up into these components (in order):&lt;/p&gt;

&lt;p&gt;A decimal number or an integer.&lt;br&gt;
(Optional) An 'e' or 'E', followed by an integer.&lt;br&gt;
A decimal number can be split up into these components (in order):&lt;/p&gt;

&lt;p&gt;(Optional) A sign character (either '+' or '-').&lt;br&gt;
One of the following formats:&lt;br&gt;
One or more digits, followed by a dot '.'.&lt;br&gt;
One or more digits, followed by a dot '.', followed by one or more digits.&lt;br&gt;
A dot '.', followed by one or more digits.&lt;br&gt;
An integer can be split up into these components (in order):&lt;/p&gt;

&lt;p&gt;(Optional) A sign character (either '+' or '-').&lt;br&gt;
One or more digits.&lt;br&gt;
For example, all the following are valid numbers: ["2", "0089", "-0.1", "+3.14", "4.", "-.9", "2e10", "-90E3", "3e+7", "+6e-1", "53.5e93", "-123.456e789"], while the following are not valid numbers: ["abc", "1a", "1e", "e3", "99e2.5", "--6", "-+3", "95a54e53"].&lt;/p&gt;

&lt;p&gt;Given a string x, return true if x is a valid number.&lt;/p&gt;

&lt;p&gt;Example 1:&lt;/p&gt;

&lt;p&gt;Input: x = "0"&lt;br&gt;
Output: true&lt;br&gt;
Example 2:&lt;/p&gt;

&lt;p&gt;Input: x = "e"&lt;br&gt;
Output: false&lt;br&gt;
Example 3:&lt;/p&gt;

&lt;p&gt;Input: x = "."&lt;br&gt;
Output: false&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I made list of possible error conditions and checked for each one which include:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Seeing an 'e'/'E' when a number has not yet been seen or more than one exponent character ('e'/'E').&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When there is more than one sign or sign appearing after a decimal or number have been seen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When decimal appeared after an 'e'/'E' has been seen or more than one decimal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Appearance of any other non-number character.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the end of x is reached without active number.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The above were achieved by setting some boolen flags for the different things being kept on track (exp, num, dec, sign).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5tqjsn6w06df0fou8nq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5tqjsn6w06df0fou8nq.PNG" alt="Image description" width="260" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 9 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Thu, 29 Sep 2022 20:14:34 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-9-code-challenge-16fa</link>
      <guid>https://dev.to/chinwendufausty/day-9-code-challenge-16fa</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;MERGE k SORTED LISTS&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An array of k linked-lists "lists", was given, of which each linked-list was sorted in ascending order. We were asked to merge all the linked-lists into one sorted linked-list and return it as shown in the given example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpv4rrvqb76pdm6cz81y5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpv4rrvqb76pdm6cz81y5.PNG" alt="Image description" width="317" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I merged two lists at a time and pushed to the array until lists.length === 1 and returned into the array.
For instance, if:
x = 1 -&amp;gt; 4 -&amp;gt; 5
y = 1 -&amp;gt; 3 -&amp;gt; 4
mergedXY = 1 -&amp;gt; 1 -&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 4 -&amp;gt;5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(push mergedXY to the array)&lt;/p&gt;

&lt;p&gt;we now have lists = [2 -&amp;gt; 6&lt;br&gt;
                     1 -&amp;gt; 1 -&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 4 -&amp;gt;5]&lt;/p&gt;

&lt;p&gt;(the merging was repeated again)&lt;/p&gt;

&lt;p&gt;x = 2 -&amp;gt; 6&lt;br&gt;
y = 1 -&amp;gt; 1 -&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 4 -&amp;gt;5&lt;br&gt;
mergedXY = 1 -&amp;gt; 1 -&amp;gt; 2-&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 4 -&amp;gt;5 -&amp;gt; 6&lt;/p&gt;

&lt;p&gt;(And this was pushed to the array)&lt;/p&gt;

&lt;p&gt;lists = [1 -&amp;gt; 1 -&amp;gt; 2-&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 4 -&amp;gt;5 -&amp;gt; 6]&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The above was returned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CODE&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;var mergeKLists = function(lists) {&lt;br&gt;
    if(lists.length ===0){&lt;br&gt;
        return null;&lt;br&gt;
    }&lt;br&gt;
while(lists.length&amp;gt;1){&lt;br&gt;
    let x = lists.shift();&lt;br&gt;
    let y = lists.shift();&lt;br&gt;
    let mergedXY = mergeList(x,y);&lt;br&gt;
    lists.push(mergedXY);&lt;br&gt;
}&lt;br&gt;
    return lists[0]&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzta5c284ojqn2jd4evao.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzta5c284ojqn2jd4evao.PNG" alt="Image description" width="367" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>leetcode</category>
      <category>challenge</category>
    </item>
    <item>
      <title>DAY 8 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Wed, 28 Sep 2022 19:39:43 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-8-code-challenge-dph</link>
      <guid>https://dev.to/chinwendufausty/day-8-code-challenge-dph</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;COMBINE TWO TABLES&lt;/strong&gt;
&lt;/h2&gt;




&lt;p&gt;Two tables were given to write an SQL query to report the firstName, lastName, city and state of each person in the "person" table. We were asked to report null if the address of a personId was not present in the "Address" table. Also, we were permitted to return result table in any order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DIAGRAMS OF THE TABLES&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qpw89uijojz8vwor43l.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qpw89uijojz8vwor43l.PNG" alt="Image description" width="257" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feivqinv8vkoiwr8g9xu3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feivqinv8vkoiwr8g9xu3.PNG" alt="Image description" width="249" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;From the information given above, left join is required for this solution because we are returning every details from the first(left) table and matched records from the second(right) table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using the select statement, select the column names (firstName, lastName, city, and state) that were stated to appear in our outcome as seen below:&lt;br&gt;
&lt;code&gt;select firstName, lastName, city, state&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select from the first(left) table (that is the one we are returning the all their records)  as seen below:&lt;br&gt;
&lt;code&gt;from Person&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Left join to the second(right) table using the first and second  tables' common field as seen below:&lt;br&gt;
&lt;code&gt;left join Address&lt;br&gt;
using(personId)&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Since we were permitted to return in any order, I would prefer we go by lastName as seen below:&lt;br&gt;
&lt;code&gt;order by lastName;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenys49xkkzfgbir9jrn6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenys49xkkzfgbir9jrn6.PNG" alt="Image description" width="745" height="209"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>sql</category>
      <category>datascience</category>
    </item>
    <item>
      <title>DAY 7 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Tue, 27 Sep 2022 21:34:41 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-7-code-challenge-2j80</link>
      <guid>https://dev.to/chinwendufausty/day-7-code-challenge-2j80</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;UTF-8 VALIDATION&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An integer array "data" representing the data was given to return whether it was a valid UTF-8 encoding. That is, if it translates to a sequence of valid UTF-8 encoded characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Track pendingBytes by starting with zero value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Iterate through the input data, convert 1 to 00000001.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the pendingBytes equalizes to zero(0) at the same time with the first value in byte array (byte[0]), continue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using the loop, iterate through the bit of byte, it must start with 1, if bit is not equal to 1, break and increment pendingBytes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTES&lt;/strong&gt;&lt;br&gt;
If starting, it needs to be &amp;gt; 1, 10 is only for following bytes.&lt;br&gt;
secondly, if greater than 4, it is also invalid.&lt;br&gt;
Lastly, a character in UTF-8 can be from 1 to 4 bytes long.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Therefore, if pendingBytes is less than or equal to 1 or greater than 4, return false and decrease pendingBytes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the first value in byte array equalizes to "1" and second value equalizes to "0", pendingBytes is decreased while we jump over one iteration in the loop and return false.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If none pending, it is valid, therefore we return pendingBytes to equalize zero (0).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4icswn1f532wfbfyvvv.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4icswn1f532wfbfyvvv.PNG" alt="Image description" width="755" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 6 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Mon, 26 Sep 2022 21:15:28 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-6-code-challenge-29kn</link>
      <guid>https://dev.to/chinwendufausty/day-6-code-challenge-29kn</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;FIZZ BUZZ MULTITHREADED&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When I noticed JavaScript was not among the languages for today's challenge, I almost gave up but on a second thought, I decided to finish up the race as no knowledge was a waste. Today's challenge was all about Fizz Buzz Multithreaded and Python3 was used to solve this particular Challenge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE BY BARRIER&lt;/strong&gt;&lt;br&gt;
Each every thread was apportioned its own loop 1 to n. The loops were advanced in sync using a Barrier whereby holding on for the four (4) threads to extend the barrier before unblocking all the threads. And at that juncture, the loop will carry on while the next number will now be processed by all the four (4) threads while the program will hold back for all the threads to reach the Barrier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6sjnrpx9yt0lk58ww3l.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6sjnrpx9yt0lk58ww3l.PNG" alt="Image description" width="738" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 5 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Sun, 25 Sep 2022 20:43:52 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-5-code-challenge-12ba</link>
      <guid>https://dev.to/chinwendufausty/day-5-code-challenge-12ba</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;SORT CHARACTERS BY FREQUENCY&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A string s= tree is given to rearrange in decreasing order of frequency such that, the output will be "eetr" or "eert". &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;APPROACH&lt;/strong&gt; &lt;br&gt;
Check the frequency of the characters;&lt;br&gt;
e = 2;&lt;br&gt;
t = 1;&lt;br&gt;
r = 1;&lt;br&gt;
writing this in decreasing order of frequency;&lt;br&gt;
output = eetr &lt;br&gt;
or&lt;br&gt;
output = eert&lt;br&gt;
Here r and t are of the same frequency, therefore anyone can be written first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I saved the frequencies in a hashtable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I sorted them (frequencies) in decreasing order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I rebuilt the strings based on  frequencies.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuij0utk7iuweyw734y4z.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuij0utk7iuweyw734y4z.PNG" alt="Image description" width="420" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>leetcode</category>
      <category>challenge</category>
    </item>
    <item>
      <title>DAY 4 CODE CHALLENGE</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Sat, 24 Sep 2022 22:27:23 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-4-code-challenge-28kf</link>
      <guid>https://dev.to/chinwendufausty/day-4-code-challenge-28kf</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;PRINT IN ORDER&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Todays challenge was a very daunting one, I migrated from JavaScript to Python3 because of the  unavailability of 'print in order' LeetCode problem in JavaScript version. Having started my coding career with python before I drifted to JavaScript I was able to scale through this challenge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;QUESTION&lt;/strong&gt;&lt;br&gt;
Suppose we have a class:&lt;br&gt;
&lt;code&gt;public class Foo{&lt;br&gt;
public void first() {print("first");}&lt;br&gt;
public void second() {print("first");}&lt;br&gt;
public void third() {print("first");}&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Here, Foo will be passed to three different threads:&lt;br&gt;
Thread A = first()&lt;br&gt;
Thread B = second()&lt;br&gt;
Thread C = third()&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TASK&lt;/strong&gt;&lt;br&gt;
Design a mechanism and modify the program to ensure that the second() is executed after the first() and the third is executed after the second().&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;br&gt;
Lock method was applied to solve this problem. I started with two locked locks, whereby first thread unlocks the first lock that the second thread was waiting on while the second thread unlocks the second lock that the third thread was waiting on&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3aviaw214vqpvwwocqj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3aviaw214vqpvwwocqj.PNG" alt="Image description" width="660" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>challenge</category>
    </item>
    <item>
      <title>DAY 3 CODE CHALLENGE (PALINDROME INTEGER)</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Fri, 23 Sep 2022 11:54:14 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/day-3-code-challenge-palindrome-integer-95f</link>
      <guid>https://dev.to/chinwendufausty/day-3-code-challenge-palindrome-integer-95f</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;PALINDROME INTEGER&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In our challenge today, we were asked to identify if a given integer is Palindrome or not. To solve any challenge, one most be willing to understand the question before execution. Let's move to the question of the day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;QUESTION AND EXPLANATION&lt;/strong&gt;&lt;br&gt;
Given an integer x, return true if x is palindrome integer.&lt;/p&gt;

&lt;p&gt;One might wonder what a palindrome integer is but wonder not.&lt;br&gt;
An integer is said to be palindrome when it reads the same both forward and backward. For example, 242 is palindrome while 148 is not. Let us also look at the following examples below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1&lt;/strong&gt;&lt;br&gt;
input: x = 242&lt;br&gt;
output: true&lt;br&gt;
Here output is true because from right to left also reads 242.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2&lt;/strong&gt;&lt;br&gt;
input: x = -242&lt;br&gt;
output: false&lt;br&gt;
Reason: From left to right reads -242 while from right to left reads 242-, making it non palindrome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3&lt;/strong&gt;&lt;br&gt;
input: x = 10&lt;br&gt;
output: false&lt;br&gt;
This is because from right to left reads 01, which implies it not palindrome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-Set backward to input x, convert to string, split and reverse it, then join as illustrated below.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let backward = x.toString().split('').reverse().join('')&lt;/code&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compare the backward string to input x and return as shown below.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;return(x.string() === backward)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RESULT OUTPUT&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g09l5r4yxsb6glbcwv5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g09l5r4yxsb6glbcwv5.PNG" alt="Image description" width="437" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>leetcode</category>
      <category>challenge</category>
    </item>
    <item>
      <title>#14G10DaysCodeChallenge(Day2: Remove Element)</title>
      <dc:creator>Achilonu Chinwendu Faustina</dc:creator>
      <pubDate>Thu, 22 Sep 2022 10:44:51 +0000</pubDate>
      <link>https://dev.to/chinwendufausty/14g10dayscodechallengeday2-remove-element-4kbh</link>
      <guid>https://dev.to/chinwendufausty/14g10dayscodechallengeday2-remove-element-4kbh</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;REMOVE OCCURRENES OF ELEMENT IN A GIVEN ARRAY&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An array of nums and value was given to remove all instances of that value in-place, to return the new length. An instruction was given to allocate extra space for another array by modifying the input array in-place with 0(1) extra memory.&lt;br&gt;
For example in input, nums = [4, 1, 2, 4] and val = 4;&lt;br&gt;
 expected output: nums = [1,2].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCEDURE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-Create indicator variable starting at zero (0) to keep track.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Iterate through every element in the array using the 'for loop'. If the current value is not equal 'val'; we set nums[indicator] to nums[i] and increment indicator.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For instance, in the given example above where we have the input, nums = [4, 1, 2, 4]. If we iterate through this, nums[0] = val, it is been skipped while we move to nums[1] which is not equal to 'val' making it to be qualified to what we want, it's been moved to the front because our indicator started with zero (0). Same is applicable to nums[2], it will also be shifted forward.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return indicator.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>leetcode</category>
      <category>challenge</category>
    </item>
  </channel>
</rss>
