<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Naveen Kamath</title>
    <description>The latest articles on Forem by Naveen Kamath (@naveenkamath).</description>
    <link>https://forem.com/naveenkamath</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%2F479672%2F4ed18bcf-9e14-4319-bf21-5251c0436be0.jpg</url>
      <title>Forem: Naveen Kamath</title>
      <link>https://forem.com/naveenkamath</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/naveenkamath"/>
    <language>en</language>
    <item>
      <title>Block Scope and Shadowing in JavaScript</title>
      <dc:creator>Naveen Kamath</dc:creator>
      <pubDate>Sat, 11 Dec 2021 19:25:28 +0000</pubDate>
      <link>https://forem.com/naveenkamath/block-scope-and-shadowing-in-javascript-3dk7</link>
      <guid>https://forem.com/naveenkamath/block-scope-and-shadowing-in-javascript-3dk7</guid>
      <description>&lt;p&gt;Hello Readers,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read this Blog to know about Block Scope and Shadowing .&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Block:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;also known as Compound Statement. For Example
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
This is a Block.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Block is used to Combine Multiple JS Statements into One Group.&lt;/li&gt;
&lt;li&gt;We group multiple statements in a Block, so that we can use it where JS expects one Statement.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(true)   //This statement will give error.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;if&lt;/strong&gt; syntax expects any statement after if(true) ...here.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(true) true //This is correct.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;But what if we want to include multiple statements in if block, Here we use &lt;strong&gt;Block {}&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(true){
  line1
  line2
  more lines ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  BlockScope:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;All the variables and Functions accessible inside a scope, so that's why we say let and const are Block Scoped because they are stored in a different memory space reserved for the Block.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Shadowing:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If we have same Variables outside as well as inside the block. The variable inside the block shadows the outer variables. 
For Example:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TZm7BIqf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzw3302o4vn8o12unz7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TZm7BIqf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzw3302o4vn8o12unz7m.png" alt="Image description" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;But Not in case of let or const due to lexical scopping&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CAGkp2Kk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1b3nro36pvy2t874l1fw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CAGkp2Kk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1b3nro36pvy2t874l1fw.png" alt="Image description" width="612" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;vice versa not true!.&lt;/li&gt;
&lt;li&gt;All these programs work same for Arrow Functions too.&lt;/li&gt;
&lt;li&gt;Thanks for Reading the blog, Have a Great Day :)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>What are Closures in JavaScript?</title>
      <dc:creator>Naveen Kamath</dc:creator>
      <pubDate>Sat, 11 Dec 2021 14:53:22 +0000</pubDate>
      <link>https://forem.com/naveenkamath/what-are-closures-in-javascript-4gf3</link>
      <guid>https://forem.com/naveenkamath/what-are-closures-in-javascript-4gf3</guid>
      <description>&lt;p&gt;Hello Readers,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep Reading this Blog to know more about Closures ....&lt;/li&gt;
&lt;li&gt;Lets Look at this Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. function x(){
2.     var a=14;
3.     function y(){
4.         console.log(a);
5.     }
6.     y();
7. }
8. x();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The above is a Example for Closure. We already know the output of this program ie a equals 14, but lets understand theory behind this.&lt;/li&gt;
&lt;li&gt;First we need to Understand what &lt;strong&gt;Lexical Scoping(LS)&lt;/strong&gt; means, &lt;/li&gt;
&lt;/ul&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%2Fhf717uc56xwafgsbtedq.png" 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%2Fhf717uc56xwafgsbtedq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LS means when y() gets called, it tries to find &lt;strong&gt;a&lt;/strong&gt; variable inside local memory but a is not found, so it goes to its Lexical Parent and it finds variable a and thus console logs it. This is called Lexical Scoping.&lt;/li&gt;
&lt;li&gt;A Function bundled together with its Lexical Environment forms Closure. Here the Function y was bundled to variables of x.&lt;/li&gt;
&lt;li&gt;so in One Way, This is what &lt;strong&gt;Closure&lt;/strong&gt; is !!!!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Closure Deep Dive
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Consider the Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. function x(){
2.     var a=14;
3.     function y(){
4.         console.log(a);
5.     }
6.     return y;
7. }
8. var z=x();
9. z();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;what is the output of the above program?&lt;/li&gt;
&lt;li&gt;The answer is when z() called in line9 returns 14, But how is that possible????&lt;/li&gt;
&lt;li&gt;We Know that &lt;strong&gt;&lt;em&gt;JS is Synchronus&lt;/em&gt;&lt;/strong&gt; ie after running line 8, x is Deleted ie X() &lt;strong&gt;Execution Context(EC) gets Deleted in Call Stack&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To know more about EC, &lt;a href="https://dev.to/naveenkamath/how-javascript-code-is-executed--iif"&gt;Read my EC Blog&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;In the above Example, '&lt;strong&gt;a&lt;/strong&gt;' is not in Global Scope and x gets deleted after line 8, So how program console logs 14. Here Closure comes into picture.&lt;/li&gt;
&lt;li&gt;When Functions are Returned from Another Function, They still maintain their &lt;strong&gt;Lexical Scoping&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When y is returned, not just function code gets returned but &lt;strong&gt;Closure enclosed function along with its Lexical Environment&lt;/strong&gt; gets returned and was assigned to z. This is the use case of Closures.&lt;/li&gt;
&lt;li&gt;Other Uses of Closures:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Currying&lt;/li&gt;
&lt;li&gt;setTimeout&lt;/li&gt;
&lt;li&gt;memoize etc&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Thanks for Reading my Blog folks, Have a great Day :)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How JavaScript Code is Executed ?</title>
      <dc:creator>Naveen Kamath</dc:creator>
      <pubDate>Fri, 10 Dec 2021 16:43:47 +0000</pubDate>
      <link>https://forem.com/naveenkamath/how-javascript-code-is-executed--iif</link>
      <guid>https://forem.com/naveenkamath/how-javascript-code-is-executed--iif</guid>
      <description>&lt;p&gt;Hello Readers,&lt;br&gt;
Did you Ever wonder what happens when JS Code is Executed. Read below to Find out More:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First of all, Everything in JavaScript happens inside an &lt;strong&gt;Execution Context(EC)&lt;/strong&gt;. So what is this EC???&lt;/li&gt;
&lt;li&gt;Lets Consider the below Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. var number=2;
2. function Square(number){
3.    var answer=number*number;
4.    return answer;
5. }
6. var SquareTwo=Square(2);
7. var SquareFour=Square(4);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;When we run the above program, A &lt;strong&gt;&lt;em&gt;Global Execution Context is initially&lt;/em&gt;&lt;/strong&gt; Created which consists of 2 phases ie Memory Creation phase and Code Execution Phase.&lt;/li&gt;
&lt;/ul&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%2Fu85yw96lcc41d56elil2.png" 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%2Fu85yw96lcc41d56elil2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;u&gt;&lt;strong&gt;&lt;em&gt;Memory Creation Phase&lt;/em&gt;&lt;/strong&gt;&lt;/u&gt; : Here JS will allocate some memory to all the variables (as Undefined) and Functions are stored as Functions. For Example, variable number will be undefined and square function will have same function etc.&lt;/li&gt;
&lt;/ul&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%2Fy5opy70kjcc6ndvmhpht.png" 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%2Fy5opy70kjcc6ndvmhpht.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;u&gt;&lt;strong&gt;&lt;em&gt;Code Execution Phase&lt;/em&gt;&lt;/strong&gt;&lt;/u&gt; : Here once again JS runs line by line and assigns original value to respective variables.
For Example, variable &lt;code&gt;var number= 2&lt;/code&gt; is assigned etc.&lt;/li&gt;
&lt;/ul&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%2Frrqj246wdzwhsuxyyin5.png" 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%2Frrqj246wdzwhsuxyyin5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;But when it arrives at line 6 , Function invocation happens and As a result A New Execution Context is created ie&lt;/li&gt;
&lt;/ul&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%2Fo2tguu7174i6z6i15hhg.png" 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%2Fo2tguu7174i6z6i15hhg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The same Memory Creation phase and Code Execution Phase is followed inside this newly created Execution Context and after all the respective calculated values are assigned , This EC will be automatically deleted.&lt;/li&gt;
&lt;/ul&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%2Fvs61t3l59eyv7e0d4pu0.png" 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%2Fvs61t3l59eyv7e0d4pu0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here a Problem arises that Inside Functions, There is a possibility of having many Execution Contexts like the below :&lt;/li&gt;
&lt;/ul&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%2F3ejh2955vuscmy6sd6za.png" 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%2F3ejh2955vuscmy6sd6za.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To resolve this, &lt;strong&gt;Call Stacks&lt;/strong&gt; were discovered : Call Stack maintains the order of Execution of Execution Contexts.&lt;/li&gt;
&lt;/ul&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%2F6kxxtqib5v9k3v5oq6b9.png" 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%2F6kxxtqib5v9k3v5oq6b9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here First EC4 is resolved and Deleted and similar process to be followed until EC1 gets deleted and the program finishes .&lt;/li&gt;
&lt;li&gt;This is how JS works, Thanks for Reading my Blog Folks :)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Make Your Own Translator App in TEN Minutes</title>
      <dc:creator>Naveen Kamath</dc:creator>
      <pubDate>Sat, 05 Dec 2020 19:05:18 +0000</pubDate>
      <link>https://forem.com/naveenkamath/make-your-own-translator-app-in-10mins-593f</link>
      <guid>https://forem.com/naveenkamath/make-your-own-translator-app-in-10mins-593f</guid>
      <description>&lt;p&gt;Hello Guys, In this Blog I will tell You how to make a Minion Translator Web App ,Enjoy :)&lt;br&gt;&lt;br&gt;
Entire Code is Available on &lt;a href="https://github.com/naveen9740/Minion-Translator-WebApp"&gt;Github&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Follow these Steps to get started :  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;# &lt;strong&gt;Setup&lt;/strong&gt; :

&lt;ol&gt;
&lt;li&gt;Create a New Repository in Git.&lt;/li&gt;
&lt;li&gt;Initialize index.html file in vs code or any other text editor.&lt;/li&gt;
&lt;li&gt;Put Title ,Heading in place.&lt;/li&gt;
&lt;li&gt;Initial commit ,Publish repo.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you &lt;strong&gt;Dont know Github&lt;/strong&gt; check my blog :&lt;a href="https://dev.to/naveen9740/how-to-host-your-first-website-n6l"&gt;How to Host Your First Website&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;# &lt;strong&gt;Adding a Button&lt;/strong&gt; :

&lt;ul&gt;
&lt;li&gt;Create a Button in Html .
&lt;code&gt;&amp;lt;button id="btn-translate"&amp;gt;Translate&amp;lt;/button&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reference the button in Js using query Selector.
&lt;code&gt;let btnTranslate=document.querySelector('#btn-translate');&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add Event Listener to Button.
&lt;code&gt;btnTranslate.addEventListener('click',clickEventHandler);&lt;/code&gt;
&lt;code&gt;function clickEventHandler(){
console.log('clicked');&lt;/code&gt;;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thats it Button is Ready.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;# &lt;strong&gt;Add TextArea Input&lt;/strong&gt; :

&lt;ul&gt;
&lt;li&gt;put a TextArea input Tag in html.
&lt;code&gt;&amp;lt;textarea class="txt-input" placeholder="Enter the Sentence to Translate"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read that is Js:
&lt;code&gt;let txtInput=document.querySelector('.txt-input');&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Read the value of the Tag :
&lt;code&gt;console.log("Input: ",txtInput.value);&lt;/code&gt;;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We are done with Input Area .&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;# &lt;strong&gt;Add a Div to show Output&lt;/strong&gt; :

&lt;ul&gt;
&lt;li&gt;Create a Output Div .
&lt;code&gt;&amp;lt;div class="txt-input" id="output"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reference in Js:
&lt;code&gt;let outputDiv=document.querySelector('#output');&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use innerText to write div when button click happens
&lt;code&gt;outputDiv.innerText=(text in input div);&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Final Thing Left is Calling Api from &lt;a href="https://funtranslations.com/"&gt;Fun Translations&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call a mock server using fetch() method.
&lt;/li&gt;
&lt;li&gt;Add fetch call in app and Update the outpur from .then() of the fetch call. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Example:&lt;br&gt;&lt;br&gt;
     &lt;code&gt;let url='https://api.funtranslations.com/translate/minion.json'&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;fetch(url)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;.then(response=&amp;gt;response.json)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;.then(json=&amp;gt;{&lt;br&gt;
        transText=json.contents.translated;  &lt;br&gt;
        outputDiv.innerText=transText;&lt;br&gt;
    })&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Finally your Minion Translation APP is ready .
&lt;/h1&gt;

&lt;p&gt;For source code check : &lt;a href="https://github.com/naveen9740/Minion-Translator-WebApp"&gt;Github&lt;/a&gt;   &lt;/p&gt;

&lt;p&gt;Thank You , Have a Nice Day :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Host Your First Website</title>
      <dc:creator>Naveen Kamath</dc:creator>
      <pubDate>Wed, 02 Dec 2020 09:16:06 +0000</pubDate>
      <link>https://forem.com/naveenkamath/how-to-host-your-first-website-n6l</link>
      <guid>https://forem.com/naveenkamath/how-to-host-your-first-website-n6l</guid>
      <description>&lt;p&gt;Hello Guys ,In this Blog I will tell you how to Host your First website from scratch .&lt;br&gt;
Follow These Steps :&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Use Github&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;If you Dont know How Github works ,Dont worry ! . I will tell you :)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Install Github Desktop:
&lt;/h3&gt;

&lt;p&gt;you can click this link &lt;a href="https://desktop.github.com/"&gt;here&lt;/a&gt; and also Create a Account in &lt;a href="https://github.com"&gt;Github.com&lt;/a&gt; .&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now Open GitHub Desktop and Intialise a git repo .Click 'Add a New Repository '. Give the Repo name of your wish and click create .
Hurray your first Git Repo has been created !!
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x7kY2gGy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/oele7w4i0vwiecl9sslh.png" alt="Screenshot (6)" width="800" height="743"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;h3&gt;
  
  
  Creating a New File in that Repo :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open this repo in VS Code or Any other editor of your choice.&lt;/li&gt;
&lt;li&gt;Create a File &lt;code&gt;index.html&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;See the Changes 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--weKKuOk7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/w6n16c2fjjs58abhgnu1.jpg" alt="Screenshot (7)_LI" width="800" height="712"&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ezH61g6Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/p2msofe539uql0jwk9z8.jpg" alt="Screenshot (8)_LI" width="800" height="450"&gt;
&lt;/li&gt;
&lt;li&gt;### Commit Your First Changes :
&lt;/li&gt;
&lt;li&gt;Open Github Desktop ,and Write a commit Message and then click 'Commit to Main '.
Some Good practises to write commits :

&lt;ul&gt;
&lt;li&gt;feat - to Add a Feature.&lt;/li&gt;
&lt;li&gt;fix -  to improve bug fix.&lt;/li&gt;
&lt;li&gt;docs - changes in Document.&lt;/li&gt;
&lt;li&gt;style - Everything Related to Styling.&lt;/li&gt;
&lt;li&gt;Refractor - Here the code Changes ,but its neither bug fix or add a new Feature.&lt;/li&gt;
&lt;li&gt;Test - Related to Testing.&lt;/li&gt;
&lt;li&gt;chore -Updating Build Tasks,configs etc .
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LLJZM5al--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/8sot2wi5foy0605psf6j.jpg" alt="Screenshot (9)_LI" width="800" height="445"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;

&lt;h3&gt;
  
  
  Finally Add a README.md File .
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet"&gt;click&lt;/a&gt; to know more.&lt;/li&gt;
&lt;li&gt;Publish Your Repo to Github from your Local Pc .Thats it You Now understand how to use Github and Git Desktop.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Use Netlify to Host our Website&lt;/strong&gt; :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First , Sign upto &lt;a href="https://app.netlify.com/"&gt;netlify&lt;/a&gt; and link your Github Account.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you followed these steps , then the next steps are piece of Cake for you :) .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;code&gt;new Site&lt;/code&gt; from repository and select your Github repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fitML-K6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/3mrf1e1dba3bzmyjyfrs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fitML-K6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/3mrf1e1dba3bzmyjyfrs.jpg" alt="Screenshot (10)_LI" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check Deploy and change Domain Name .
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tej4AIMk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ap8jqswc5ufx78h6a3ya.jpg" alt="Screenshot (11)_LI" width="800" height="450"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;YAY ! Your website is hosted now&lt;/strong&gt; :
&lt;/h1&gt;

&lt;p&gt;One Final thing Left :&lt;/p&gt;

&lt;h3&gt;
  
  
  Understand Pull and push Request  :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;push :

&lt;ul&gt;
&lt;li&gt;After you publish your Repository to Github ,From Now On if you make any changes to your website .
Make sure to commit and push the code to your github account.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;pull : 

&lt;ul&gt;
&lt;li&gt;If multiple people are working with the same code base , then For Eg: if your friend commits and pushes the code, MakeSure you pull that code to your Local pc.Thats it !.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Thank you ,Bye&lt;/em&gt; :)&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>github</category>
      <category>git</category>
    </item>
  </channel>
</rss>
