<?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: Agikonyo</title>
    <description>The latest articles on DEV Community by Agikonyo (@agikonyo).</description>
    <link>https://dev.to/agikonyo</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%2F813411%2Fd6f9e838-5d5a-4027-9fe1-00495dea3ecd.png</url>
      <title>DEV Community: Agikonyo</title>
      <link>https://dev.to/agikonyo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agikonyo"/>
    <language>en</language>
    <item>
      <title>Modern JavaScript for everyone: Mastering Modern JavaScript The Right Way</title>
      <dc:creator>Agikonyo</dc:creator>
      <pubDate>Fri, 04 Mar 2022 09:16:06 +0000</pubDate>
      <link>https://dev.to/agikonyo/modern-javascript-for-everyone-mastering-modern-javascript-the-right-way-3dk</link>
      <guid>https://dev.to/agikonyo/modern-javascript-for-everyone-mastering-modern-javascript-the-right-way-3dk</guid>
      <description>&lt;p&gt;A.  What is JavaScript?&lt;br&gt;
B.  What one requires to learn programming&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;&lt;u&gt;Introduction&lt;/u&gt;&lt;/strong&gt;
JavaScript is one of the world’s most popular programming language. It is also a scripting or programming language that allows you to implement complex features on web pages as It makes the webpages interactive displaying timely content updates, interactive maps, animated graphics. JavaScript was invented by Brendan Eich in 1995 
The early versions of JavaScript were called Mocha&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;u&gt;To learn JavaScript one requires to understand the following:&lt;/u&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt;  Recognize that you don’t know it and use that as motivation to read on it and get better at it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt;  Each time your code works always challenge yourself to learn something new and try out another task. Don’t get comfortable that you are good at it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c)    Get functional&lt;/strong&gt;- functional programming is a programming paradigm where programs are constructed by applying and composing functions.&lt;br&gt;
To get a better understanding of getting functional; Understand the following concepts&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;i.   Immutability&lt;/em&gt;&lt;/strong&gt;- This means that we can't change values in variables, objects, or even arrays. Instead, we need to create a new variable, object, or array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;ii.  Pure functions&lt;/em&gt;&lt;/strong&gt; - This means that functions will always return an output, but  cannot have side effects nor can it rely on external variables or state&lt;br&gt;
&lt;strong&gt;&lt;em&gt;iii. Composition&lt;/em&gt;&lt;/strong&gt; – This is the functionality of more complex objects. Instead of focusing on what an object is, we focus on &lt;em&gt;what an object can do&lt;br&gt;
**_iv.  Closures&lt;/em&gt;** - This is an inner function that has access to variables from an outer function. In JavaScript, closures are created every time a function is created, at function creation time&lt;br&gt;
&lt;strong&gt;&lt;em&gt;v.   Currying&lt;/em&gt;&lt;/strong&gt; – This is when we take a function with multiple arguments and then rewrite it as a series of functions, each with one argument&lt;br&gt;
&lt;strong&gt;&lt;em&gt;vi.  Recursion&lt;/em&gt;&lt;/strong&gt; -This is simply a function that calls itself&lt;br&gt;
&lt;strong&gt;d)    Keep up with the latest specs&lt;/strong&gt;&lt;br&gt;
Just make sure you keep up with the most recent changes to JavaScript, which means everything from ES2015 on for example you should know the following features from later specs;&lt;br&gt;
&lt;em&gt;i. Async functions from ES2017(ES8)&lt;br&gt;
ii. Object rest/spread properties from ES2018(ES9)&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;e)    Embrace asynchrony&lt;/strong&gt;&lt;br&gt;
This model allows multiple things to happen at the same time. You should learn the following tools as well to understand this concept better;&lt;br&gt;
&lt;em&gt;i. Promises&lt;br&gt;
ii. Bonus&lt;br&gt;
iii.    Async/Wait&lt;br&gt;
iv. Know where the language ends and the framework begin&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;f)    Framework&lt;/strong&gt;&lt;br&gt;
If you’re using a framework, make sure you know when you are using JavaScript and when you are using the framework&lt;br&gt;
&lt;strong&gt;g)    Learn about prototypal inheritance&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;h)    Make your code editor fun&lt;/strong&gt;&lt;br&gt;
For example, Visual studio (Vs Code) has extensions such as prettier, which are free that can be used to make your project look fun and exciting&lt;br&gt;
&lt;strong&gt;i)    Always Test your code&lt;/strong&gt;&lt;br&gt;
Test-driven development  encourages you to start small and break a big problem into many smaller parts&lt;br&gt;
&lt;strong&gt;j)    Build an environment from scratch&lt;/strong&gt;&lt;br&gt;
An environment is the data structure that provides storage space. To understand JavaScript better try to create your own environment, rather than reusing the environment that was created previously&lt;br&gt;
&lt;strong&gt;k)    Teach others what you’ve learned&lt;/strong&gt;&lt;br&gt;
Have discussions and teach others what you have learnt thus with practice you will understand better the concepts after doing it a number of times.&lt;br&gt;
&lt;strong&gt;l)    Ask questions&lt;/strong&gt;&lt;br&gt;
Always ask questions to get clarity and a better understanding of JavaScript and also to learn from others and get different perspectives from other programmers with experience in the same field. We learn by asking questions and willing to learn from others&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Introduction to Data Structures and Algorithms with Modern JavaScript</title>
      <dc:creator>Agikonyo</dc:creator>
      <pubDate>Mon, 21 Feb 2022 12:54:07 +0000</pubDate>
      <link>https://dev.to/agikonyo/introduction-to-data-structures-and-algorithms-with-modern-javascript-1g6d</link>
      <guid>https://dev.to/agikonyo/introduction-to-data-structures-and-algorithms-with-modern-javascript-1g6d</guid>
      <description>&lt;p&gt;In this article we will tackle the following:&lt;br&gt;
i.  What are data structures and Types of Data Structures?&lt;br&gt;
ii. What is an Algorithm?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Structures&lt;/strong&gt; &lt;br&gt;
Data structures allow you to manage data. They help us to store and organize the data primitives, so that they can be efficiently accessed and used in algorithms.&lt;br&gt;
&lt;strong&gt;a.    Arrays&lt;/strong&gt;&lt;br&gt;
Arrays are ordered list of sequences of primitive data types, that are a special variable, which can hold more than one value. There are two object-oriented implementations of array-like objects: queue and stacks. In Array data duplicates are allowed, Size is adjusted dynamically, elements are accessed via index and are iterable (therefore, you can use the for loop)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b.    Hashtable / map&lt;/strong&gt;&lt;br&gt;
A hash table is a dictionary-like data structure, where keys are paired with values. Maps are great for rapid retrieval and modification of data since they store data for easy access. Maps have become nearly ubiquitous. They are Ordered key value with pairs of data, and one can access data via keys. Maps are iterable and keys can be anything (we can use reference values) &lt;br&gt;
&lt;strong&gt;c.    Objects&lt;/strong&gt;&lt;br&gt;
In objects we group data into one. The keys that are used in objects have to be numbers or strings. Keys are important because they’re unique while values are not .Objects have contracts that can store data .Objects can contain methods and functionalities and are not iterable&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d.    Sets&lt;/strong&gt;&lt;br&gt;
Sets are unordered list of data, that doesn’t allow duplicates. In sets Insertion order is not stored, We access and extract data via method, iterable is allowed one ( can use the for loop)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;e.    Stacks&lt;/strong&gt;&lt;br&gt;
A stack is an ordered list which follows LIFO (last in first out) algorithm. You can access the elements of a stack from only a single end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Algorithms&lt;/strong&gt;&lt;br&gt;
An algorithm is a sequence of steps to solve a well-defined problem. A set of rules that precisely define a sequence of operations. We have different types of algorithms as stated below;&lt;br&gt;
&lt;strong&gt;i.    Binary Search&lt;/strong&gt;&lt;br&gt;
This is a divide and conquer algorithm, that divides the array in half every time it checks whether an element of the array is the one, we're looking for.&lt;br&gt;
&lt;strong&gt;ii.   Big O notation&lt;/strong&gt;&lt;br&gt;
This is a way of representing the general growth in the computational hardness of a task as you increase the data set. We have 5 types of Big O notation as stated below&lt;br&gt;
• O(1)&lt;br&gt;
• O(n)&lt;br&gt;
• O(n^2)&lt;br&gt;
• O(log n)&lt;br&gt;
• O(n!)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iii.  Imperative code&lt;/strong&gt;&lt;br&gt;
 This is when you tell your program every single step to achieve a specific outcome as per your expected output.&lt;br&gt;
&lt;strong&gt;iv.   Recursion&lt;/strong&gt;&lt;br&gt;
This is a programming technique using function or algorithm that calls itself one or more times until a specified condition is met at which time the rest of each repetition is processed from the last one called to the first. Recursion involves solving problems by breaking things down into simpler/smaller versions of themselves&lt;br&gt;
&lt;strong&gt;v.    Tail recursion&lt;/strong&gt;&lt;br&gt;
This is when, instead of doing an invocation of the recursive function as the return statement, it does a jump and reuses the same context of the prior recursive called.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ultimate JavaScript Guide or Introduction to Modern JavaScript</title>
      <dc:creator>Agikonyo</dc:creator>
      <pubDate>Mon, 14 Feb 2022 08:18:27 +0000</pubDate>
      <link>https://dev.to/agikonyo/ultimate-javascript-guide-or-introduction-to-modern-javascript-4l5h</link>
      <guid>https://dev.to/agikonyo/ultimate-javascript-guide-or-introduction-to-modern-javascript-4l5h</guid>
      <description>&lt;p&gt;On this article will discuss the following topics on JavaScript;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; What is JavaScript?&lt;/li&gt;
&lt;li&gt; A Simple JavaScript Syntax&lt;/li&gt;
&lt;li&gt; Variables in JavaScript&lt;/li&gt;
&lt;li&gt; Data types in JavaScript&lt;/li&gt;
&lt;li&gt; Array methods in JavaScript&lt;/li&gt;
&lt;li&gt; Loops in JavaScript&lt;/li&gt;
&lt;li&gt; Conditional statements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Introduction into JavaScript&lt;/strong&gt;&lt;br&gt;
JavaScript is an open source and commonly known as a client-side scripting language, which is dynamic and is used to enhance the interaction of webpages. To run JavaScript You can use the web console of your preferred browser like Chrome (ctrl+shift+I on windows and ctrl+shift+k on mac ) or you can use code editors like Visual Studio code, Atom or sublime text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple JavaScript Syntax&lt;/strong&gt;&lt;br&gt;
// This is my first code (This indicates a comment that gives more information about the code but is not executed)&lt;br&gt;
/&lt;em&gt;Welcome to my first code&lt;br&gt;
Happy coding&lt;/em&gt;/ (This is used in cases where we have multiple lines of comments)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example of a simple JavaScript syntax;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NLeHySnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzzmvm03qr060omxgv16.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NLeHySnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzzmvm03qr060omxgv16.PNG" alt="Syntax" width="880" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables in JavaScript&lt;/strong&gt;&lt;br&gt;
All JavaScript variables must be identified with unique names referred to as identifiers&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;How to declare variables in JavaScript&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
As shown below num, are variables, declared with the var keyword&lt;/p&gt;

&lt;p&gt;a)  &lt;strong&gt;Var&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HxDWn9-D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m17o5z2ryb34kdwe0n66.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HxDWn9-D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m17o5z2ryb34kdwe0n66.PNG" alt="Var" width="880" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;b)  &lt;strong&gt;Strings&lt;/strong&gt;&lt;br&gt;
In cases where we have, we dealing with a string value, we also declare a variable, initializing it with a string value, and then returning the value. Point to note where dealing with a string you need to surround the value with quote&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--khAfxvIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/79hyafvxa5wpc3cse5c9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--khAfxvIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/79hyafvxa5wpc3cse5c9.PNG" alt="String" width="880" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;c)  &lt;strong&gt;Let&lt;/strong&gt;&lt;br&gt;
As shown below a, b and c are variables, declared with the let keyword&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QdjTBdY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lg23i7oq1g2ak5vcq5d7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QdjTBdY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lg23i7oq1g2ak5vcq5d7.PNG" alt="Let" width="880" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;d)  &lt;strong&gt;Const&lt;/strong&gt;&lt;br&gt;
This defines a constant reference to a value. You cannot reassign a value, array or an object&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wvvt2wZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x77tnzf65xqr1dxa1kyf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wvvt2wZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x77tnzf65xqr1dxa1kyf.PNG" alt="Const" width="880" height="59"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        **Data types in JavaScript**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We have 7 data types in JavaScript namely; string, number,  bigint, Boolean, null, undefined, and symbol. We will have a discussion on what each of them represents&lt;/p&gt;

&lt;p&gt;i.  &lt;strong&gt;String&lt;/strong&gt;&lt;br&gt;
A string (or a text string) is a series of characters like “Ann”. When using a string it’s supposed to be quoted with either a single quote or a double quote&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xl7oxdGn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qegk36febbw65u7272pk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xl7oxdGn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qegk36febbw65u7272pk.PNG" alt="String" width="880" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ii. &lt;strong&gt;Number&lt;/strong&gt;&lt;br&gt;
JavaScript has only one type of numbers such as 1,2,3,4. In number values we can use the ones with a decimal point or not as both are allowed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RV5mL44j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j00zkz8lsdh4y044zx3u.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RV5mL44j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j00zkz8lsdh4y044zx3u.PNG" alt="Number" width="880" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;iii.    &lt;strong&gt;Bigint&lt;/strong&gt;&lt;br&gt;
For a bigint, this is similar to the number data type but it holds bigger values. For this you add the letter n, next to you value to indicate that it’s an integer,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sXHMJLR_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s6cv7dy7iyc5d0auk3os.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sXHMJLR_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s6cv7dy7iyc5d0auk3os.PNG" alt="Bigint" width="880" height="27"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;iv. &lt;strong&gt;Boolean&lt;/strong&gt;&lt;br&gt;
Booleans can only have two values; True or False&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k0Br8zyi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6muqf2bzy6l1jijpjj34.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k0Br8zyi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6muqf2bzy6l1jijpjj34.PNG" alt="Boolean" width="880" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              **Array methods in JavaScript**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;An array object is used to store multiple values in a single variable&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MP2uqaf6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0dg1kyu3mi0lp77186c.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MP2uqaf6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0dg1kyu3mi0lp77186c.PNG" alt="Array" width="880" height="55"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;JavaScript Arrays are divided into two&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;One-dimensional arrays&lt;/em&gt;- This is a linear array which consists of only one row or column&lt;br&gt;
&lt;em&gt;Multi-dimensional arrays&lt;/em&gt;- This is an array with two or more columns&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             **Loops in JavaScript**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In cases where you would want to run the same code multiple times, each time with a different value&lt;br&gt;
&lt;em&gt;&lt;strong&gt;FOR&lt;/strong&gt;&lt;/em&gt; - loops through the code specified for a number of times&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PK4Zpixq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vccgg3l936fm3cg72um0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PK4Zpixq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vccgg3l936fm3cg72um0.PNG" alt="For_loop" width="880" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;WHILE&lt;/strong&gt;&lt;/em&gt; - loops through a block of code for as long as the specified condition is true&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nAZcRD5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/teu5dmqtoov3mh98znyt.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nAZcRD5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/teu5dmqtoov3mh98znyt.PNG" alt="While_Loop" width="880" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;DO WHILE&lt;/em&gt;&lt;/strong&gt; – This condition loops for as long as the specified condition is true&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6-BhoarG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1os2rsjuxo32eavvque.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6-BhoarG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1os2rsjuxo32eavvque.PNG" alt="Do_While_Loop" width="880" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          **Conditional statements**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We have four types of conditional statements in JavaScript&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;- This is when we have a block of code is executed, if the set condition is true&lt;br&gt;
          &lt;strong&gt;&lt;em&gt;Syntax&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;if (condition) {&lt;br&gt;
  // code to be executed if the condition is true&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELSE&lt;/strong&gt;- This is else to specify a block of code to be executed, if the same condition is false&lt;br&gt;
            &lt;strong&gt;&lt;em&gt;Syntax&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
if (condition) {&lt;br&gt;
  //code to be executed if the condition is true&lt;br&gt;
} else {&lt;br&gt;
  //code to be executed if the condition is false&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELSE IF&lt;/strong&gt;- This is used else if to specify a new condition to test, if the first condition is false&lt;br&gt;
                  &lt;strong&gt;&lt;em&gt;Syntax&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
if (condition1) {&lt;br&gt;
  //code to be executed if condition1 is true&lt;br&gt;
} else if (condition2) {&lt;br&gt;
  //code to be executed if the condition1 is false and condition2 is true&lt;br&gt;
} else {&lt;br&gt;
  //code to be executed if the condition1 is false and condition2 is false&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SWITCH&lt;/strong&gt;- We use switch to select one of many blocks of code to be executed&lt;br&gt;
        &lt;strong&gt;&lt;em&gt;Syntax&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
switch(expression) {&lt;br&gt;
  case n:&lt;br&gt;
    //answer block of code&lt;br&gt;
    break;&lt;br&gt;
  case n:&lt;br&gt;
    //answer block of code&lt;br&gt;
    break;&lt;br&gt;
  default:&lt;br&gt;
    default //answer block of code&lt;br&gt;
}&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
