<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Faizan Amjad on Medium]]></title>
        <description><![CDATA[Stories by Faizan Amjad on Medium]]></description>
        <link>https://medium.com/@faizan.amjad47?source=rss-653594cd0c00------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Lv8AUSK_awKd6a9ZSR0Syw.png</url>
            <title>Stories by Faizan Amjad on Medium</title>
            <link>https://medium.com/@faizan.amjad47?source=rss-653594cd0c00------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:35:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@faizan.amjad47/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to create AngularJS Project in VS 2017 | Quick Guide]]></title>
            <link>https://medium.com/@faizan.amjad47/how-to-create-angularjs-project-in-vs-2017-b0fd67b9ce76?source=rss-653594cd0c00------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0fd67b9ce76</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vs2017]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[visual-studio-2017]]></category>
            <dc:creator><![CDATA[Faizan Amjad]]></dc:creator>
            <pubDate>Sat, 17 Feb 2018 09:37:17 GMT</pubDate>
            <atom:updated>2018-02-18T09:10:21.873Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating and deploying AngularJs project/app without an IDE like Visual Studio is very hectic and time consuming task. VS-2017 really help us creating Angular Applications on the fly and help us saving our time and mind peace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*7LDY404JSmnZGxAxXdUPag.png" /></figure><p>In this guide we will create a simple AngularJs application using Visual Studio 2017 Community Version (you can use Professional or Enterprise version too) and see how to deploy the app on localhost.</p><p>First open Visual Studio and press create new project, then select ASP.NET Web Application from Web section as shown in image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*Lb4drypRtaIR2z65fCJDfw.png" /></figure><p>Name the application whatever you want(i here entered AngularJSApp). After pressing OK another dialog box opens prompting about the template, select empty and press OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*eyfHRju_1PEU_6g-MGKVIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAJ8kgVl-kABcXnbdQcmug.png" /></figure><p>Your project will look something like the above after following the mentioned steps. After this, right click on your project name in solution explorer and select<strong> ‘Manage Nuget Packages…’</strong>, go to the Browse tab and enter <strong><em>angularjs </em></strong>in search bar which will show you a list of related libraries. Select <strong>AngularJS.Core</strong> by <strong>The AngularJS Team </strong>as shown in image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jerMAmA7CEg1S9qww7EEBg.png" /></figure><p>Now a folder of <strong>scripts </strong>will be added <strong>automatically </strong>in your project which will contain angularjs library. Create a new <strong>index.html</strong> file in the project root location and <strong>Set As Start Page</strong> by right clicking on it.You can create the following project structure which has app folder on the root containing controllers, services, views (which will be simple html files) and app.js file,this architecture is clean, modular and widely used for Angular JS applications and you can extend it further to fulfill your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRzdoaKf7qCK7TXXB8psIQ.png" /></figure><p>Copy paste the following code for respective files:</p><h3>app.js</h3><pre>var app = angular.module(‘demo’, []);</pre><h3>demoController.js</h3><pre>app.controller(&#39;demoController&#39;, function ($scope) {</pre><pre>$scope.Message = &quot;Hello To AngularJS QuickStart&quot;;</pre><pre>});</pre><h3>index.html</h3><p>&lt;!DOCTYPE html&gt;<br>&lt;html ng-app=”demo”&gt;<br>&lt;head&gt;<br>&lt;meta charset=”utf-8&quot; /&gt;<br>&lt;title&gt;AngularJs Sample&lt;/title&gt;<br>&lt;script src=”Scripts/angular.min.js”&gt;&lt;/script&gt;<br>&lt;script src=”app/app.js”&gt;&lt;/script&gt;<br>&lt;script src=”app/controllers/demoController.js”&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;div ng-controller=”demoController”&gt;<br>&lt;h2&gt;{{Message}}&lt;/h2&gt;<br>&lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</p><p>The index.html file is a simple html file and the starting point of our angular application which loads the angular js library, module and controller scripts.You can see above that <strong>demo </strong>is our module’s name and <strong>demoController </strong>is the name of the controller.You have now successfully created the Angular JS App, hit Ctrl + F5 and Visual Studio will deploy it automatically on localhost so we don’t have to worry about that. Thanks for reading, Enjoy….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*xGM1rr4HpyKL3P_lNvqFsg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0fd67b9ce76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Important JavaScript Concepts Every Developer MUST Know]]></title>
            <link>https://medium.com/@faizan.amjad47/important-concepts-every-javascript-developer-must-know-ddcc1627f077?source=rss-653594cd0c00------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddcc1627f077</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[callback]]></category>
            <category><![CDATA[prototype-inheritance]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[closure]]></category>
            <dc:creator><![CDATA[Faizan Amjad]]></dc:creator>
            <pubDate>Sun, 31 Dec 2017 15:05:19 GMT</pubDate>
            <atom:updated>2018-06-28T13:32:01.983Z</atom:updated>
            <content:encoded><![CDATA[<p>Javascript is one of the most widely used programming languages for the past few years and becoming more and more popular with the time. The popularity of the language can be examined by the stats provided by the top Tech websites like Stackoverflow and Github (also known as “Facebook for Developers”). Following is the graph provided by Github that lists Javacript on the Top. The chart shows number of pull requests (request to download and edit a project’s code) in each language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPn2N_mCqWoTvuLOYKvwKA.png" /><figcaption>The fifteen most popular languages on GitHub (Image Source: <a href="https://octoverse.github.com/">Github</a>)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*57RXo54YuyTDYoiwpwnn6A.png" /><figcaption>Most Popular Programming Languages of 2017 (Image Source: <a href="https://insights.stackoverflow.com/survey/2017">Stackoverflow</a>)</figcaption></figure><p>Stats by Stackoverflow about most popular technologies also lists JavaScript on top. With the increase in front end frameworks like Angular JS/2, React and Vue JS, JavaScript is becoming more widely used programming language than ever.</p><p>In this article, we will discuss following most important concepts of JavaScript that JS Developers must have knowledge about, and see their practical usage and sample codes.</p><h4><em># Closures<br># Prototype Inheritance<br># Hoisting<br></em># Single threaded JS &amp; Event Loop<em><br># Callbacks &amp; Promises<br># Array Manipulation Functions</em></h4><p>So lets Start…..</p><h3>#1: Closures:</h3><p>Closure in layman’s terms is simply a function inside a function, also called nested function. It looks pretty straightforward when we see it like this but the real magic is related to its scopes. A closure has three scopes, nested function has access to variables defined in its own scope, in the scope of its parent function and the global variables. This behavior of closures can be very handy when It comes to programming in Javascript. One of all the benefits of this is the abstraction, as we all know that Javascript is not pure class based Object Oriented Programming language like Java and C# but we can achieve this OO behavior through……. YESS! → Closures. Consider the following code sample:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fu5yfhrxx%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fu5yfhrxx%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/787ecbc7650eb6f2fc4c6c4b3f1e79de/href">https://medium.com/media/787ecbc7650eb6f2fc4c6c4b3f1e79de/href</a></iframe><p>In the code above you can see that the getFullName() function has the access to the outer function’s firstName and lastName properties and we can think of var object as an Object having these two properties and getFullName() a method as in an OOP language. The other important thing to notices here is that we can’t access the properties here, no matter they are part of foo, the reason behind this is the return statement, we have only given access to the method not the properties. It kind of works like the access modifiers of OOP language, to make that code work, we have to do something like this:</p><pre>return<br>{</pre><pre>getFullName:getFullName,</pre><pre>firstName:firstName,</pre><pre>lastName:lastName</pre><pre>}</pre><p>One very important thing you guys might have noticed is that after foo() statement is executed in the previous code snippet, variables inside the foo() function will not be destroyed (unlike other functions when they return, their variables are destructed) because of closures as the scope is kept alive here and child function can still access the properties of parent function.</p><h3>#2: Prototype Inheritance:</h3><p>Inheritance is the well-known concept in programming and has its many benefits like reusability, minimize duplicate code, easy and flexibility in changing code, extensibility and many more.</p><p>Every javascript object (standard JS objects, functions and custom objects) has a prototype. The prototype is also an object and these objects inherit their methods and properties from. We can create a JS prototype through a constructor function (In JS, functions are also objects). A constructor function has the following syntax:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fpz1e1qff%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fpz1e1qff%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e0999dd5fb9b6c994032f80699e5753/href">https://medium.com/media/4e0999dd5fb9b6c994032f80699e5753/href</a></iframe><p>We can also do Person.prototype.region = ‘Asia’ and the region property will also be inherited by all objects of Person prototype.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fdbbzee0h%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fdbbzee0h%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/346b0c60db427cb1de770a462221cf33/href">https://medium.com/media/346b0c60db427cb1de770a462221cf33/href</a></iframe><p>Prototype inheritance can be used to extend standard JavaScript objects as well. Like the code sample on left, will print date in DD/MM/YYYY format.</p><h3>#3: Hoisting</h3><p>Variable hoisting is a concept that most of the developers fail to notice which leads to unexpected results in the script. In JS, the interpreter move any variable and function declaration to top of the current scope (function scope or global scope). You might have noticed that we can call a function in JS before it is defined (viewing from top to bottom), the reason behind this is hoisting. Consider the following code example:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fvre2j2zq%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fvre2j2zq%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dd7e57a24f2cce62369eb9630fa58db/href">https://medium.com/media/0dd7e57a24f2cce62369eb9630fa58db/href</a></iframe><p>As you can see we can call the foo function no matter it is defined later in the script and also console.log(abc) printed undefined instead of giving ‘Uncaught Reference’ not defined exception as abc is actually defined later and it was moved to top of the scope before execution. Just the declaration part (var abc) is hoisted not the assignment part(=20). That is why undefined is printed. Not knowing of this concept can lead to unexpected errors that can be difficult to handle.</p><h3>#4: Single threaded JS &amp; Event Loop</h3><p>Once an interviewer asked me that “Is Javascript Multi threaded or Single threaded”, I said Single. He then asked, “Then how the ASYNC calls are handled and the UI thread is responsive during the call”, I couldn’t answer then.</p><p>The fact is that Javascript is actually single threaded, each tab or window runs a single JS thread. JS engine manages a queue of events to which events are enqued and dequed, when an async call is sent through ajax and its response is received, an event is pushed into that event queue. These events are also pushed for button clicks handlers, time outs or key press handler etc. JS thread keeps on checking that queue when thread is idle and there is nothing to execute, if there is something in the queue, it pops it out and execute. To make it simple to understand just say that there is a queue of unprocessed events and a loop that iterates over this queue and execute the event handlers of those events one by one. The single threaded behavior can be understood by the example that there are two events in the event queue for ajax response received and one for a mouse over, but we are executing an infinite loop in the current JS thread, those callbacks will not get a chance to run no matter their time has come and will always be executed when the thread is idle.</p><h3>#5: Callbacks:</h3><p>Callbacks is a very important concept in javascript as it can be very handy in many scenarios. A callback is simply a function that is passed to another function as a parameter and is invoked or executed inside the other function. This might not seem helpful now but it will be pretty clear after the following example. Suppose there is a function that takes a studentId as a parameter and returns the employee object returned from the server based on that Id and we have to show that student returned from this function, on screen.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fmb5b6830%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fmb5b6830%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4322b7f194d1e06984399c26a3a30b27/href">https://medium.com/media/4322b7f194d1e06984399c26a3a30b27/href</a></iframe><p>It looks fine when we see it but there is a problem when we execute it. The problem is the function returns a null and the reason behind is that ajax call is asynchronous and executed separately waiting for the result from the server and meanwhile function returns the same null value that we assigned earlier.</p><p>Here comes the <strong>callbacks</strong>. The simplest solution to this problem is passing a callback that is invoked when the result arrives from server. After doing that the code will look something like this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2FovLfnhwo%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2FovLfnhwo%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/a59f8d4d43cb5a6422deea25fff7a580/href">https://medium.com/media/a59f8d4d43cb5a6422deea25fff7a580/href</a></iframe><p>Callback solved our problem but let just think for a second that we just handled the success scenario not the failure, for that we will have to pass another callback function (success and failure cases) and what if we want to execute two or more back to back async operations where each subsequent function starts when the previous one is completed. This can be easily handled with promises.</p><h3>#6: Promises</h3><p>According to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises">developer.mozilla</a> :</p><blockquote>A Promise is an object representing the eventual completion or failure of an asynchronous operation. Essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function.</blockquote><p>The benefits of using promises are also described here at <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises">developer.mozilla</a>:</p><blockquote>* We can do chaining with promises i.e. executing two or more asynchronous operations back to back<br>* Callbacks will never be called before the completion of the current run of the JavaScript event loop<br>* Callbacks added with .then even after the success or failure of the asynchronous operation, will be called<br>* Multiple callbacks may be added by calling .then several times, to be executed independently in insertion order</blockquote><p>We will discuss some of these concepts later. But first create our own promise and convert the previous getStudentById() code to return a promise and then attach our callbacks to that.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2F46jua1xu%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2F46jua1xu%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/62baa4f05d171e9d31762789e5256514/href">https://medium.com/media/62baa4f05d171e9d31762789e5256514/href</a></iframe><p>In code above, in case of success, we resolve the promise and pass data from server to resolve which eventually passes to successCallback and invoke attached callback, and incase of failure, promise will be rejected and failureCallback will be invoked. One of the benefits of using promises is that, lets suppose we want to do two asynchronous operations and the second operation is <strong>dependent</strong> <strong>on the result of first operation</strong>. It can be done easily with promises like this:</p><pre>firstOperation().then(function(resultFromFirst)<br>{<br>return secondOperation(resultFromFirst);<br>}).then(function(newResult){<br>// do something else with this result<br>})</pre><p>The second operation will be executed after the first one is completed and firstOnes result will be passed to the second.<strong> This is called</strong> <strong>Chaining </strong>in promises and is one of significant benefits of promises. <strong>Another advantageous use case of promises </strong>is, let suppose we want to do something when all of our promises are resolved, we have to wait for<strong> all</strong> the promises to resolve and then perform some operation<strong> on the basis of results of all</strong>. We can do something like this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fvk5e8zpg%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fvk5e8zpg%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/58d1b20519ccebefb0335e4b1df13464/href">https://medium.com/media/58d1b20519ccebefb0335e4b1df13464/href</a></iframe><p>It is resolved when all the promises in the array are resolved and rejected when any of them is rejected. Modern functions (like Angular $http module) return promises, we just have to attach our callbacks to it and don’t need to write our own.</p><h3>#7: Array Manipulation:</h3><p>JS arrays provide a lot of handy functions that most of the guys don’t know. One of them is array <strong><em>filter()</em></strong>, the filter function takes a functions as a parameter, executes the function on each element of the array and returns a newly created array of the elements that passed the condition provided in the function, for example we have a student array:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fj6kgw2u3%2Fembedded%2F&amp;url=https%3A%2F%2Fjsfiddle.net%2Ffaizan_amjad%2Fj6kgw2u3%2F&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F21b9be080ba1bdf58c9a61f521efca4a%2F%3Fdefault%3D%26s%3D120&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e27dcde082a4ce3c6052b5432bb9f39c/href">https://medium.com/media/e27dcde082a4ce3c6052b5432bb9f39c/href</a></iframe><p>Another useful function is <strong><em>map()</em></strong>, while filter function is used to search or strain an array as the name suggests, map function is used to apply an operation on each element of array, it iterates over each element of array, applies the provided function just like filter and returns new array of all the elements after the provided operation. The very basic example is:</p><pre>var array = [1,2,3,4];</pre><pre>var result = array.map(function(element){</pre><pre>return element * 2;<br>});<br>//The result will be newly created array having 2,4,6,8 </pre><p>We can concatenate javascript arrays using <strong><em>concat()</em></strong> method, it takes array to be concatenated as parameter and returns the new array while keeping the original ones unchanged. JS arrays can contain different types of data types like below:</p><pre>var array1 = [1,2,3];</pre><pre>var array2 = [4,5,&#39;six&#39;];</pre><pre>var result = array1.concat(array2); // result will be: 1,2,3,4,5,six</pre><p>more arrays related helper functions can be found on <a href="https://www.w3schools.com/jsref/jsref_obj_array.asp">W3School</a></p><h3>Conclusion:</h3><p>These were some of the concepts that I learnt and considered should be shared with everybody to help them understand JS easily with practical examples. I hope this article might have helped you about learning something about JavaScript.Please do correct me if I am wrong somewhere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddcc1627f077" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>