<?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: John Mutisya</title>
    <description>The latest articles on DEV Community by John Mutisya (@john909520).</description>
    <link>https://dev.to/john909520</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%2F625780%2F2a43c3d7-0cf5-4726-b90a-849d8e45d993.png</url>
      <title>DEV Community: John Mutisya</title>
      <link>https://dev.to/john909520</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/john909520"/>
    <language>en</language>
    <item>
      <title>ECMAScript 6 FEATURES:</title>
      <dc:creator>John Mutisya</dc:creator>
      <pubDate>Mon, 21 Jun 2021 17:13:51 +0000</pubDate>
      <link>https://dev.to/john909520/ecmascript-6-features-387o</link>
      <guid>https://dev.to/john909520/ecmascript-6-features-387o</guid>
      <description>&lt;h3&gt;
  
  
  Template Literals
&lt;/h3&gt;

&lt;p&gt;Template literals gives us an easy way of printing strings in JavaScript.&lt;/p&gt;

&lt;p&gt;They also give us an easy way of having variables.&lt;br&gt;
For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Let&lt;/span&gt; &lt;span class="nx"&gt;fName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;John&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;Let&lt;/span&gt; &lt;span class="nx"&gt;lName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Kioko&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="nx"&gt;fullName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;` &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the above example, we are using template literals to concatenate our fName and lName variables and then assigning them to the fullName Variable. &lt;/p&gt;

&lt;p&gt;Previously we would have achieved the same result as shown below;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="nx"&gt;fullName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Template literals gives us a clean way of having a multi-line strings as shown below;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="nx"&gt;fullName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;` &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; 
&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object Destructuring:
&lt;/h3&gt;

&lt;p&gt;Object destructuring allows us to access the keys of an object without having to reference it all the time;&lt;/p&gt;

&lt;p&gt;Example of an object,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="nx"&gt;player&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Victor&lt;/span&gt; &lt;span class="nx"&gt;Wanyama&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;club&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;MLS&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;address&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;city&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Florida&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;Destructuring&lt;/span&gt; &lt;span class="nx"&gt;our&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;club&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;address&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object Literals
&lt;/h3&gt;

&lt;p&gt;ES6 has put emphasis in writing less code while being readable and maintainable.&lt;/p&gt;

&lt;p&gt;Object literals allow us to write less code while being descriptive.&lt;/p&gt;

&lt;p&gt;An example of a normal object;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addressMaker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newAdress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newAdress&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;addressMaker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Austin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Texas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;how&lt;/span&gt; &lt;span class="nx"&gt;our&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="nx"&gt;looks&lt;/span&gt; &lt;span class="nx"&gt;after&lt;/span&gt; &lt;span class="nx"&gt;re&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;writing&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="nx"&gt;literals&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addressMaker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newAdress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
       &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newAdress&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;addressMaker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Austin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Texas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For…of  loop
&lt;/h3&gt;

&lt;p&gt;The for…of loop is a new feature of JavaScript that was introduced in the later version of ES6.&lt;/p&gt;

&lt;p&gt;It allows us to iterate over an entire iterable (strings, Array, sets etc).&lt;/p&gt;

&lt;p&gt;The syntax of the for…of loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;For&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;iterable&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="nx"&gt;Body&lt;/span&gt; 
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example of a for…of Loop;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;incomes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;62000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;67000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;75000&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;income&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;incomes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;income&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Spread Operator
&lt;/h3&gt;

&lt;p&gt;The spread operator( … ) is used to expand or spread an iterable or an array. For Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;contacts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Joel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Danny&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;personalFriends&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;contacts&lt;/span&gt; &lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;contacts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;personalFriends&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example we have our array of contacts and then we are creating another array of personalFriends which copies the elements of contacts.&lt;/p&gt;

&lt;p&gt;We then push another element to our first array contacts and on printing it we see that our new element has been included into the contacts array.&lt;/p&gt;

&lt;p&gt;Printing our first array;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;contacts&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Joel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Danny&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;John&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But if we print our other array that we created by copying the elements of our first array contacts using … spread operator, we see that John is not included.&lt;/p&gt;

&lt;p&gt;Printing personalFriends array:&lt;/p&gt;

&lt;p&gt;console.log(personalfriends);&lt;/p&gt;

&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Joel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Danny&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arrow Functions
&lt;/h3&gt;

&lt;p&gt;This new ES6 feature gives us a cleaner way of creating functions as compared to regular functions. For example;&lt;/p&gt;

&lt;p&gt;This function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="nx"&gt;Return&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can be written in arrow function as;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Default Params
&lt;/h3&gt;

&lt;p&gt;Default params allows us to give a value to our function paramete.r for example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;leadSinger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;artist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someone&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;such that when we are calling the function without providing it with a value, it will default to the value provided to the parameter instead of giving us undefined. An Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;leadSinger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;artist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someone&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; is the lead singer of Cold Play`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;leadSinger&lt;/span&gt; &lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someone is the lead singer of Cold Play&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Includes()
&lt;/h3&gt;

&lt;p&gt;The includes() method checks to see if an element is included and returns a Boolean value of true or false.&lt;/p&gt;

&lt;p&gt;In the below example we are using includes() to check if a recipe is in the array then prints the relevant console message;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;listIngredients&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flour&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sugar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eggs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;butter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nx"&gt;listIngredients&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;chocolate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We are going to make a chocolate cake&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We can't make a chocolate cake because we are missing the ingredient chocolate”);
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Let &amp;amp; Const
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Let &amp;amp; const&lt;/code&gt; are block scoped declarations.&lt;/p&gt;

&lt;p&gt;Let variables can be updated but not re-declared. Const variables can neither be updated nor re-declared. &lt;/p&gt;

&lt;h3&gt;
  
  
  Import &amp;amp; Export:
&lt;/h3&gt;

&lt;p&gt;This allows us to follow the solid principles and do dependency injection and more object orientated programming.&lt;/p&gt;

&lt;p&gt;It essentially allows our code to be more modular in nature which lends it to be more easily organised.&lt;/p&gt;

&lt;h3&gt;
  
  
  Classes
&lt;/h3&gt;

&lt;p&gt;A class is a blueprint of an object. You can create an many objects from a class.&lt;/p&gt;

&lt;p&gt;Creating classes in JavaScript is similar to creating constructor functions.&lt;/p&gt;

&lt;p&gt;A constructor function is defined as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// constructor function &lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;dog&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;breed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;germany&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;white&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// create an object&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dog1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;dog&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When creating clases, you replace the function keyword with the class keyword. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//A dog class &lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;dog&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;breed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;breed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;breed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// create an object&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dog1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;dog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;germany&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;white&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The class keyword is used to create a class. The properties are assigned in a constructor function.&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript Map
&lt;/h3&gt;

&lt;p&gt;Maps in javascript are similar to objects, they allow us to store elements in a key/value pair.&lt;/p&gt;

&lt;p&gt;Elements in a map are inserted in an insertion order. A map can contain objects, functions and other data types as keys.&lt;/p&gt;

&lt;p&gt;To create a map we use the new map() constructor. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// create a Map&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;map1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// an empty map&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;map1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Map {}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Javascript Sets
&lt;/h3&gt;

&lt;p&gt;Sets are similar to arrays in that they allow us to multiple items like numbers,strings, objects, etc. Sets cannot contain duplicate values.&lt;/p&gt;

&lt;p&gt;To create a javascript set, you need to use the new set() constructor. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight j"&gt;&lt;code&gt;&lt;span class="n"&gt;Const&lt;/span&gt; &lt;span class="n"&gt;set1&lt;/span&gt; &lt;span class="nf"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;set&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;This article covers ES6 features. If there is any that you feel  has been left out and you would like it to be covered, leave a comment.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lets Take A Dive Into Git</title>
      <dc:creator>John Mutisya</dc:creator>
      <pubDate>Mon, 31 May 2021 16:08:09 +0000</pubDate>
      <link>https://dev.to/john909520/lets-take-a-dive-into-git-3p22</link>
      <guid>https://dev.to/john909520/lets-take-a-dive-into-git-3p22</guid>
      <description>&lt;h2&gt;
  
  
  What is Git?
&lt;/h2&gt;

&lt;p&gt;Git is an open source distributed version control system. To break it down;&lt;/p&gt;

&lt;p&gt;Git is a control System: It’s a content tracker. It is used to store content especially code due to the  features it provides.&lt;br&gt;
It is a version control system: Code that is stored in Git keeps on changing as developers keep on making changes to the existing code and even adding new code. Git serves as a version control system by handling these changes and maintaining a history of those changes as they happen.&lt;/p&gt;

&lt;p&gt;It serves as a distributed version control system in that, it has a remote repository stored in a server and a local repository stored in the computer of each developer. Each developer’s computer has the full copy of the code and thus distributed. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing Git:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is an open source application and it can be downloaded online for free. This link &lt;a href="https://git-scm.com/"&gt;https://git-scm.com/&lt;/a&gt;., Will take you to their website from where you can download Git for your specific platform.&lt;br&gt;
 You’ll also find documentation on how to install it.&lt;br&gt;
You can verify if Git has been installed successfully by running this command in the command prompt. &lt;br&gt;
&lt;code&gt;Git –version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Below are the steps of working with Git to make changes to a code base, opening a pull request(PR), and merging code into the primary branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Local Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A repository is a directory that stores all of the files and folders needed for a project and the changes made to them.&lt;/p&gt;

&lt;p&gt;When creating a new project on your local machine using, you’ll first have to create a new repository often referred to as ‘repo’.&lt;/p&gt;

&lt;p&gt;These commands are used to change a directory and create a new one;&lt;br&gt;
&lt;code&gt;Cd ~/desktop&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Mkdir gitdemo&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;To initialize a repository in the root folder we will use,&lt;br&gt;
&lt;code&gt;Git –init&lt;/code&gt; in the command terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding a new file to the repository.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can add a new file to the project using any text editor or by running the touch command. For example &lt;code&gt;touch newfile.txt&lt;/code&gt;, this creates and saves a blank file named “newfile.txt”.&lt;/p&gt;

&lt;p&gt;Once we have added or modified files in a folder containing a git repo, git will notice that the file exists inside the repo, but won’t track the file unless you tell it to explicitly.&lt;/p&gt;

&lt;p&gt;Git only saves or manages changes to files that it tracks. For it saves the new changes we need to send it a command that tell it that we want to track our new file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;touch newfile.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use the git status command to see which files git knows exist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BERNARD@BERNARD-PC MINGW64 ~/desktop/gitdemo (master)
$ git status
On branch master

No commits yet

Untracked files:
  (use "git add &amp;lt;file&amp;gt;..." to include in what will be committed)
        techsolproject.txt

nothing added to commit but untracked files present (use "git add" to track)

BERNARD@BERNARD-PC MINGW64 ~/desktop/gitdemo (master)
$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Staging and Committing the code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Committing is the process of adding code to the local repository. Before committing the code, it has to be in the staging area. The staging area is there to keep track of all the files which are to be committed.&lt;/p&gt;

&lt;p&gt;Files that have not been added to the staging cannot be committed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Staging&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To add the file to the staging area we will use the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add newfile.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Incase you want to add muiltiple files you can run the command as shown below,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add file1 file2 file3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To add the files inside your projects folder into the staging area we use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Git add .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use the above command with caution as it adds all the files and folders in your project to the staging area.&lt;br&gt;
Committing&lt;/p&gt;

&lt;p&gt;To commit the file we will use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Git commit –m “Message describing the commit”.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The message in the double quotation marks is the commit message. Make sure to use a relevant commit message that describes what code changes were done in that particular commit.&lt;br&gt;
Create a new branch&lt;/p&gt;

&lt;p&gt;Now that you've made a new commit, let's create a branch.&lt;br&gt;
Say you want to make a new feature but are worried about making changes to the main project while developing the feature. This is where git branches come in. &lt;/p&gt;

&lt;p&gt;Branches allow you to move back and forth between 'states' of a project. Official git docs describe branches this way: ‘A branch in Git is simply a lightweight movable pointer to one of these commits.’ For instance, if you want to add a new page to your website you can create a new branch just for that page without affecting the main part of the project. Once you're done with the page, you can merge your changes from your branch into the primary branch. When you create a new branch, Git keeps track of which commit your branch 'branched' off of, so it knows the history behind all the files. &lt;/p&gt;

&lt;p&gt;Let's say you are on the primary branch and want to create a new branch to develop your web page. Here's what you'll do: &lt;code&gt;Run git checkout -b &amp;lt;my branch name&amp;gt;&lt;/code&gt;. This command will automatically create a new branch and then 'check you out' on it, meaning git will move you to that branch, off of the primary branch.&lt;br&gt;
After running the above command, you can use the git branch command to confirm that your branch was created:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git branch&lt;br&gt;
 master&lt;br&gt;
*my-new-branch&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a new repository on GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you only want to keep track of your code locally, you don't need to use GitHub. But if you want to work with a team, you can use GitHub to collaboratively modify the project's code.&lt;br&gt;
To create a new repo on GitHub, log in and go to the GitHub home page. You can find the “New repository” option under the “+” sign next to your profile picture, in the top right corner of the navbar:&lt;/p&gt;

&lt;p&gt;After clicking the button, GitHub will ask you to name your repo and provide a brief description.&lt;/p&gt;

&lt;p&gt;When you're done filling out the information, press the 'Create repository' button to make your new repo.&lt;/p&gt;

&lt;p&gt;GitHub will ask if you want to create a new repo from scratch or if you want to add a repo you have created locally. In this case, since we've already created a new repo locally, we want to push that onto GitHub so follow the '....or push an existing repository from the command line' section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin https://github.com/cubeton/mynewrepository.git
git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 263 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/githubusername/mynewrepository.git
 * [new branch]      master -&amp;gt; master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Branch master set up to track remote branch master from origin.&lt;br&gt;
 (You'll want to change the URL in the first command line to what GitHub lists in this section since your GitHub username and repo name are different.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push a branch to GitHub&lt;/strong&gt;&lt;br&gt;
Now we'll push the commit in your branch to your new GitHub repo. &lt;/p&gt;

&lt;p&gt;This allows other people to see the changes you've made. If they're approved by the repository's owner, the changes can then be merged into the primary branch.&lt;/p&gt;

&lt;p&gt;To push changes onto a new branch on GitHub, you'll want to run git push origin yourbranchname. GitHub will automatically create the branch for you on the remote repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin my-new-branch
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/githubusername/mynewrepository.git
 * [new branch]      my-new-branch -&amp;gt; my-new-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might be wondering what that "origin" word means in the command above. What happens is that when you clone a remote repository to your local machine, git creates an alias for you. &lt;/p&gt;

&lt;p&gt;In nearly all cases this alias is called "origin." It's essentially shorthand for the remote repository's URL. So, to push your changes to the remote repository, you could've used either the command: &lt;code&gt;git push git@github.com:git/git.git yourbranchname&lt;/code&gt; or &lt;code&gt;git push origin yourbranchname&lt;/code&gt;&lt;br&gt;
(If this is your first time using GitHub locally, it might prompt you to log in with your GitHub username and password.)&lt;/p&gt;

&lt;p&gt;If you refresh the GitHub page, you'll see note saying a branch with your name has just been pushed into the repository. You can also click the 'branches' link to see your branch listed there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a pull request (PR)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A pull request (or PR) is a way to alert a repo's owners that you want to make some changes to their code. It allows them to review the code and make sure it looks good before putting your changes on the primary branch.&lt;/p&gt;

&lt;p&gt;You might see a big green button at the bottom that says 'Merge pull request'. Clicking this means you'll merge your changes into the primary branch..&lt;/p&gt;

&lt;p&gt;Sometimes you'll be a co-owner or the sole owner of a repo, in which case you may not need to create a PR to merge your changes. However, it's still a good idea to make one so you can keep a more complete history of your updates and to make sure you always create a new branch when making changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Merge a PR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go ahead and click the green 'Merge pull request' button. This will merge your changes into the primary branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get changes on GitHub back to your computer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Right now, the repo on GitHub looks a little different than what you have on your local machine. For example, the commit you made in your branch and merged into the primary branch doesn't exist in the primary branch on your local machine.&lt;/p&gt;

&lt;p&gt;In order to get the most recent changes that you or others have merged on GitHub, use the git pull origin master command (when working on the primary branch). In most cases, this can be shortened to “git pull”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin master
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/githubusername/mynewrepository
 * branch            master     -&amp;gt; FETCH_HEAD
   b345d9a..5381b7c  master     -&amp;gt; origin/master
Merge made by the 'recursive' strategy.
newfile.txt | 1 +
 1 file changed, 1 insertion(+)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows you all the files that have changed and how they've changed.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A Brief Introduction to CSS for Beginners.</title>
      <dc:creator>John Mutisya</dc:creator>
      <pubDate>Sun, 16 May 2021 14:47:48 +0000</pubDate>
      <link>https://dev.to/john909520/a-brief-introduction-to-css-for-beginners-4gn4</link>
      <guid>https://dev.to/john909520/a-brief-introduction-to-css-for-beginners-4gn4</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is CSS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt; is an acronym for "Cascading Style Sheet" - it is a simple design language intended for styling web pages. CSS handles the look and feel part of web pages.&lt;/p&gt;

&lt;p&gt;Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, layout designs, variations in display for different devices, and screen sizes as well as a variety of other effects.&lt;/p&gt;

&lt;p&gt;Here is an example that shows the effects of CSS on an Html document.&lt;/p&gt;

&lt;p&gt;Below you see how  an Html document looks before CSS has been applied,&lt;/p&gt;

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

&lt;p&gt;And here you see how it looks after applying CSS.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  CSS Syntax:
&lt;/h2&gt;

&lt;p&gt;CSS uses style rules that are interpreted by the browser and then applied to the corresponding elements in the document.&lt;/p&gt;

&lt;p&gt;A CSS Style rule is made up of three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Selector&lt;/strong&gt; -  this is an HTML tag on which a style will be applied.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Property&lt;/strong&gt; - it is a type of attribute in the HTML tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Value&lt;/strong&gt; - this refers to what is assigned to a property.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can put CSS Style Rule Syntax as follows:&lt;br&gt;
&lt;code&gt;selector { property: value }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How We Apply CSS in Html Documents.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can apply CSS in three different ways into an HTML document;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inline style&lt;/strong&gt;: &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this method, CSS styles are included in the Html tag using the style attribute.&lt;/p&gt;

&lt;p&gt;It can be done like shown in the below example;&lt;br&gt;
&lt;code&gt;&amp;lt;p style = “color : red”&amp;gt;Some Text &amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Using inline CSS on an Html document is not considered best – practice as Html documents should be presentation free and thus inline styles should be avoided where possible.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Internal style&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Internal styles are embedded in the head section of the Html document, and styles are applied to the whole page.&lt;br&gt;
Inside the head element, the styles tag surrounds all of the styles for the page.&lt;/p&gt;

&lt;p&gt;Below is an example of internal styles;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Internal Css&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;P&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="py"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="py"&gt;Font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&lt;/span&gt;
&lt;span class="err"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, the color will be applied to the paragraph's and font size of 20 pixels.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;External style&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In external styles, a separate CSS file is created that contains all the styles that will be used in the whole, multi-site page.&lt;/p&gt;

&lt;p&gt;External stylesheets are linked together with the Html document in the head section of the Html document.&lt;br&gt;
An external CSS file is created like shown below;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
    color: red;
}

a {
    color: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file is saved in the same directory as the Html page, it can then be linked to the Html as shown below;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;CSS Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"filename.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CONCLUSION.
&lt;/h3&gt;

&lt;p&gt;CSS is one of the main building blocks of the web today. This article is an overview of CSS, what CSS is, what CSS does, and its basic syntax.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>HyperText mark-Up Language (HTML).</title>
      <dc:creator>John Mutisya</dc:creator>
      <pubDate>Sat, 08 May 2021 20:26:49 +0000</pubDate>
      <link>https://dev.to/john909520/hypertext-mark-up-language-html-3e20</link>
      <guid>https://dev.to/john909520/hypertext-mark-up-language-html-3e20</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is Html? Hypertext Mark-up Language (Html) is the language for creating web pages and web applications. Hypertext means that the document can contain links that will take the user to a different part of the document or other pages once clicked. Mark-Up language refers to how computers talk to each other to control how text is presented and processed.&lt;br&gt;
Html was first created by Tim Berners-Lee, Robert Cailliau, and others starting in 1989.&lt;br&gt;
Html uses tags and attributes to describe different types of content on your web applications&lt;br&gt;
Tags mark the start of an Html element and they usually have backward and forward angle brackets.&lt;br&gt;
Attributes on the other hand contain &lt;strong&gt;additional pieces of information&lt;/strong&gt;. They take the form of an opening tag and the &lt;strong&gt;additional piece of information&lt;/strong&gt; is placed inside. &lt;/p&gt;
&lt;h2&gt;
  
  
  WHY LEARN HTML
&lt;/h2&gt;

&lt;p&gt;Html originally was created with the intent of defining the structure of documents e.g, headings, paragraphs, lists, etc., to facilitate sharing of scientific information between researchers.&lt;br&gt;
Html is a crucial resource for web developers today, as it is widely used to format web pages with the help of the different available tags in the language.&lt;br&gt;
Advantages of Learning Html:&lt;br&gt;
• Create web sites&lt;br&gt;
• Become a web designer&lt;br&gt;
• Understand web&lt;/p&gt;
&lt;h2&gt;
  
  
  Applicattions Of HTML.
&lt;/h2&gt;

&lt;p&gt;From the definition of Html above, we can with confidence refer to it as the language of the web. Below are some of the things that can be achieved by using Html:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web Pages Development –Most of the web pages seen today on the web have been created with Html.&lt;/li&gt;
&lt;li&gt;Internet Navigation – Html provides tags that are used to navigate from one page to another and are heavily used in internet navigation.&lt;/li&gt;
&lt;li&gt;Responsive User interface - HTML pages nowadays work well on all platforms, mobile, tabs, desktop, or laptops owing to responsive design.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Tools Used To Write Html;
&lt;/h3&gt;

&lt;p&gt;Html can not be written using word processors like Microsoft word, Rather we use Html editors. Below are some  of the Html editors we use today;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sublime Text 3&lt;/li&gt;
&lt;li&gt;Notepad++&lt;/li&gt;
&lt;li&gt;Komodo Edit&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Writing Our First Html Page
&lt;/h2&gt;

&lt;p&gt;`&lt;br&gt;
We use the following tags to construct a basic Html page structure;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/em&gt;&lt;/strong&gt; — This tag specifies the language you will 
             write on the page. In this case, the 
                  language is Html 5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Html tag&lt;/em&gt;&lt;/strong&gt; — This tag signals that from here on we are 
               going to write in Html code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;head tag&lt;/em&gt;&lt;/strong&gt; — This is where all the metadata for the page 
               goes,
            stuff mostly meant for search engines and other 
            computer programs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;body tag&lt;/em&gt;&lt;/strong&gt; — This is where the content of the page goes.
`
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="err"&gt;!&lt;/span&gt;&lt;span class="na"&gt;DOCTYPE&lt;/span&gt; &lt;span class="na"&gt;html&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; This is document title&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;  
   &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Inside the head tag, there is the title tag that contains the name of the page as It will appear at the top of the browser's window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding Content.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We add more content to our Html document in the body section of the document. We combine the use of other tags and attributes inside the body to create content that is visible to humans on the internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding Headings to Our Html Page.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use different levels of heading tags to add headings into our Html document as shown below.&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;h1&gt; This is a heading 1 &lt;/h1&gt;
&lt;/h1&gt;
&lt;h2&gt;
  
  
  &lt;h2&gt; This is a heading 2  &lt;/h2&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;h3&gt; This is a heading 3 &lt;/h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
  
  
  &lt;h4&gt; This is a heading 4 &lt;/h4&gt;
&lt;/h3&gt;
&lt;h5&gt;
  
  
  &lt;h5&gt; This is a heading 5 &lt;/h5&gt;
&lt;/h5&gt;
&lt;h6&gt;
  
  
  &lt;h6&gt; This is a heading 6 &lt;/h6&gt;
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding More Text Into Our Html&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We add text to our Html page by using the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag. We place all our text in between the opening &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and closing &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; tag. This tag is used to create a new paragraph.&lt;br&gt;
For Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;This is our first html document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;  
   &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;This is a heading&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Hello World!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding Links To Our Html Pages:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We add links to our pages by using the anchor &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag. &lt;br&gt;
The anchor tag uses an attribute that contains an address to the page we are linking to.&lt;/p&gt;

&lt;p&gt;The first part of the attribute contains the page that will open once the link is clicked.&lt;br&gt;
The second part shows the text that will be displayed to the viewer of the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;This is our first html document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;  
   &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;This is a heading&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Hello World!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://shop.techsolsoftwares.com/blog/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Learn More On Our Blog&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;   
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding Images to Our Html Page.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We add images to our Html page using the Image tag which also has an attribute element that points to the location of the image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Creating a List of items on our Html Page;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Three different types of lists can be created on an Html page;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;1 Ordered Lists – We use &amp;lt;ol&amp;gt; to define an ordered list. Inside the &amp;lt;ol&amp;gt; we create the list using &amp;lt;li&amp;gt; tag.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For example;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ol&amp;gt;&lt;/span&gt; 
        -&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;An item &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        - &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Another item &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        -&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Another goes here &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt; 
&lt;span class="nt"&gt;&amp;lt;/ol&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;2 Unordered List - We use an unordered list tag to define an unordered list.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt; 
       - &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;An item &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
       - &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Another item &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
       - &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Another goes here &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt; 
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;3 Definition List- We can include a definition list in our html page using &amp;lt;dl&amp;gt;. Inside the &amp;lt;dl&amp;gt; we will include the definition term &amp;lt;dt&amp;gt; and the definition &amp;lt;dd&amp;gt;.&lt;/code&gt;&lt;br&gt;
For example;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dl&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dt&amp;gt;&lt;/span&gt;Item&lt;span class="nt"&gt;&amp;lt;/dt&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dd&amp;gt;&lt;/span&gt;The definition goes here&lt;span class="nt"&gt;&amp;lt;/dd&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dl&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;In this article, we have defined Html, Discussed why it is important to learn and its applications. We have also covered some basic syntax to get us started before diving deep into it.&lt;/p&gt;

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