<?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: Daniel Obare</title>
    <description>The latest articles on DEV Community by Daniel Obare (@danielobare).</description>
    <link>https://dev.to/danielobare</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%2F812888%2F213d4840-207f-47fc-9088-3dbb6f2b76e6.jpeg</url>
      <title>DEV Community: Daniel Obare</title>
      <link>https://dev.to/danielobare</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danielobare"/>
    <language>en</language>
    <item>
      <title>Modern JavaScript for everyone: Mastering Modern JavaScript The Right Way</title>
      <dc:creator>Daniel Obare</dc:creator>
      <pubDate>Thu, 03 Mar 2022 17:04:25 +0000</pubDate>
      <link>https://dev.to/danielobare/modern-javascript-for-everyone-mastering-modern-javascript-the-right-way-45nb</link>
      <guid>https://dev.to/danielobare/modern-javascript-for-everyone-mastering-modern-javascript-the-right-way-45nb</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;1. Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;JavaScript is the language of the web. If you want to code for the web, you need to know JavaScript inside and out. From humble beginnings, JavaScript has grown to a powerful and complex language with features such as classes, promises, arrow functions, generators, string templates, and many others.&lt;/p&gt;

&lt;p&gt;We will start with the very fundamentals of the language: variables and datatypes. Then in each lesson you'll build knowledge, from data structures like arrays and maps to loops, control structures, and functions. Along with the basics of the language, you'll also learn some key built-in APIs for manipulating data, AJAX, and working with the web browser DOM. Finally, we'll get a look at some of the most powerful and widely used web APIs that are supported by all modern browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Language Fundamentals&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;2.1 Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A variable is a container for a value, like a number we might use in a sum, or a string that we might use as part of a sentence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myAge = 17;
let dolphinGoodbye = 'So long and thanks for all the fish';
let iAmAlive = true;
let test = 6 &amp;lt; 3;
let myNameArray = ['Chris', 'Bob', 'Jim'];
let dog = { name : 'Spot',
            breed : 'Dalmatian' };
let myNumberArray = [10, 15, 40];

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.2 Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript is a loosely typed and dynamic language. Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types:&lt;br&gt;
&lt;code&gt;let foo = 42;    // foo is now a number&lt;br&gt;
foo     = 'bar'; // foo is now a string&lt;br&gt;
foo     = true;  // foo is now a boolean&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript types&lt;/strong&gt;&lt;br&gt;
The set of types in the JavaScript language consists of primitive values and objects.&lt;/p&gt;

&lt;p&gt;Primitive values (immutable datum represented directly at the lowest level of the language)&lt;br&gt;
Boolean type&lt;/p&gt;

&lt;p&gt;Null type&lt;br&gt;
Undefined type&lt;br&gt;
Number type&lt;br&gt;
BigInt type&lt;br&gt;
String type&lt;br&gt;
Symbol type&lt;br&gt;
Objects (collections of properties)&lt;br&gt;
Primitive values&lt;/p&gt;

&lt;p&gt;All types except objects define immutable values (that is, values which can't be changed). For example (and unlike in C), Strings are immutable. We refer to values of these types as "primitive values".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boolean type&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Boolean&lt;/em&gt; represents a logical entity and can have two values: true and false. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Null type&lt;/strong&gt;&lt;br&gt;
The &lt;em&gt;Null type&lt;/em&gt; has exactly one value: null. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Undefined type&lt;/strong&gt;&lt;br&gt;
A variable that has not been assigned a value has the value undefined. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Number type&lt;/strong&gt;&lt;br&gt;
The number type has only one integer with two representations: 0 is represented as both -0 and +0. (0 is an alias for +0.)&lt;br&gt;
&lt;code&gt;&amp;gt; 42 / +0&lt;/code&gt;&lt;br&gt;
Infinity&lt;br&gt;
&lt;code&gt;&amp;gt; 42 / -0&lt;/code&gt;&lt;br&gt;
-Infinity&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.3 Arithmetic, Assignment and comparison operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.3.1 Arithmetic operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An arithmetic operator takes numerical values (either literals or variables) as their operands and returns a single numerical value. The standard arithmetic operators are addition &lt;strong&gt;(+)&lt;/strong&gt;, subtraction &lt;strong&gt;(-)&lt;/strong&gt;, multiplication &lt;strong&gt;(*)&lt;/strong&gt;, and division &lt;strong&gt;(/)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;1 / 2; // 0.5&lt;br&gt;
1 / 2 == 1.0 / 2.0; // this is true&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.3.2 Assignment operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An assignment operator assigns a value to its left operand based on the value of its right operand. The simple assignment operator is equal &lt;strong&gt;(=)&lt;/strong&gt;, which assigns the value of its right operand to its left operand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let obj = {};

obj.x = 3;
console.log(obj.x); // Prints 3.
console.log(obj); // Prints { x: 3 }.

const key = "y";
obj[key] = 5;
console.log(obj[key]); // Prints 5.
console.log(obj); // Prints { x: 3, y: 5 }.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.3.3 Comparison operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A comparison operator compares its operands and returns a logical value based on whether the comparison is true. The operands can be numerical, string, logical, or object values. Strings are compared based on standard lexicographical ordering, using Unicode values. In most cases, if the two operands are not of the same type, JavaScript attempts to convert them to an appropriate type for the comparison. This behavior generally results in comparing the operands numerically. The sole exceptions to type conversion within comparisons involve the &lt;strong&gt;===&lt;/strong&gt; and &lt;strong&gt;!==&lt;/strong&gt; operators, which perform strict equality and inequality comparisons. These operators do not attempt to convert the operands to compatible &lt;br&gt;
types before checking equality. Other comparison examples include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Equal (==), Not equal (!=), Strict equal (===), Strict not equal (!==), Greater than (&amp;gt;), Greater than or equal (&amp;gt;=), Less than (&amp;lt;), Less than or equal (&amp;lt;=).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.3.4 Logical operator&lt;/strong&gt;&lt;br&gt;
Logical operators are typically used with Boolean (logical) values; when they are, they return a Boolean value. However, the &lt;strong&gt;&amp;amp;&amp;amp;&lt;/strong&gt; and &lt;strong&gt;||&lt;/strong&gt; operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value. Another example is &lt;strong&gt;Logical NOT (!)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a1 =  true &amp;amp;&amp;amp; true;     // t &amp;amp;&amp;amp; t returns true
var a2 =  true &amp;amp;&amp;amp; false;    // t &amp;amp;&amp;amp; f returns false
var a3 = false &amp;amp;&amp;amp; true;     // f &amp;amp;&amp;amp; t returns false
var a4 = false &amp;amp;&amp;amp; (3 == 4); // f &amp;amp;&amp;amp; f returns false
var a5 = 'Cat' &amp;amp;&amp;amp; 'Dog';    // t &amp;amp;&amp;amp; t returns Dog
var a6 = false &amp;amp;&amp;amp; 'Cat';    // f &amp;amp;&amp;amp; t returns false
var a7 = 'Cat' &amp;amp;&amp;amp; false;    // t &amp;amp;&amp;amp; f returns false

var o1 =  true || true;     // t || t returns true
var o2 = false || true;     // f || t returns true
var o3 =  true || false;    // t || f returns true
var o4 = false || (3 == 4); // f || f returns false
var o5 = 'Cat' || 'Dog';    // t || t returns Cat
var o6 = false || 'Cat';    // f || t returns Cat
var o7 = 'Cat' || false;    // t || f returns Cat

var n1 = !true;  // !t returns false
var n2 = !false; // !f returns true
var n3 = !'Cat'; // !t returns false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.3.5 Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// The following variables are defined in the global scope
var num1 = 20,
    num2 = 3,
    name = 'Chamakh';

// This function is defined in the global scope
function multiply() {
  return num1 * num2;
}

multiply(); // Returns 60

// A nested function example
function getScore() {
  var num1 = 2,
      num2 = 3;

  function add() {
    return name + ' scored ' + (num1 + num2);
  }

  return add();
}

getScore(); // Returns "Chamakh scored 5"

function addSquares(a, b) {
  function square(x) {
    return x * x;
  }
  return square(a) + square(b);
}
a = addSquares(2, 3); // returns 13
b = addSquares(3, 4); // returns 25
c = addSquares(4, 5); // returns 41

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;3. Data Structures &amp;amp; Algorithms&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With the primitive data types defined, we can now work on some data structure implementations specific to JavaScript. Data structures are a way of storing and organizing the data primitives we just described so that they can be efficiently accessed and used in algorithms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.1: Arrays&lt;/strong&gt;&lt;br&gt;
Arrays are sequences of primitive data types, similar to a list. In JavaScript, there are two common object-oriented implementations of array-like objects: stacks and queues, as well as the specially defined array object. Stacks and queues differ from the exact definition of arrays in other programming languages by how objects are added or removed.&lt;/p&gt;

&lt;p&gt;Queues are FIFO (first in, first out) while stacks are LIFO (last in, first out). You can think of a queue as a line of people going into a store, where the first one in the line gets into the store, and a stack as a stack of files, with the last one placed on the stack being the first one out.&lt;/p&gt;

&lt;p&gt;Both queues and stacks offer the opportunity to display every datatype stored within the array and to slice and “peek” at particular elements. This is also true of the JavaScript array type, which is a specially defined object in JavaScript.&lt;/p&gt;

&lt;p&gt;We can work with arrays to define a list of data types, and then index and filter for the first one (by definition, arrays are zero-indexed, meaning a slice of [0] for the index will return the first item and so on).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.2: Linked Nodes&lt;/strong&gt;&lt;br&gt;
Linked nodes include many different types of array-like objects since they store datatypes in sequences. The critical difference is that instead of pointing to indexes as we saw with our array example of when a datatype was placed in an array, linked nodes hold pointers to other objects. So, in order to follow the linked nodes, you’ll have to transverse the different list objects using each one as a reference to go to the next one. You start at the head and then go all the way to the tail instead of calling a master index.&lt;/p&gt;

&lt;p&gt;There are multiple types, from singly-linked lists, doubly-linked lists (which links the tail to the head, allowing us to travel back and forth through the different data types) to trees and graphs. Trees connect parents to multiple child nodes as opposed to linked lists, which connects one parent with one child. Graphs allow for the connection of multiple parent nodes to multiple child nodes. Here is an implementation of a linked list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.3: Hash Tables&lt;/strong&gt;&lt;br&gt;
A hash table is a dictionary-like data structure, where keys are paired with values. Hash tables are great for rapid retrieval and modification of data, though the array and list-like objects above are better for storage. Still, especially with the explosive growth of data, hash tables have become nearly ubiquitous. For example, popular NoSQL databases used in the web such as MongoDB and Redis are distributed hash tables and key/value stores. This is an example of a hash table implementation in JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Implementing Algorithms Using JavaScript&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.4: Doubling Algorithm (Arithmetic Algorithm)&lt;/strong&gt;&lt;br&gt;
Let’s start off with a simple arithmetic function, that shows us how to do a sequence of steps in JavaScript. We’ll take something and multiply it by two, then log it to our console. This requires us to define a simple variable and function.&lt;/p&gt;

&lt;p&gt;Note at the end that when we try passing a string datatype to this algorithm, it results in an NaN datatype (not a number).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.5: QuickSort (Sorting Algorithm)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A common problem with programming algorithms is how to sort through arrays of values so that they come in some logical order, say, from the lowest to the highest integer in an array of numbers. QuickSort is a sorting algorithm that can help with this. By employing a pivot and going through subsets of an array, we can slowly sort every element that is smaller than the pivot to its left.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.6: Jump Search (Search Algorithm)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we’ve sorted an array, another common class of programming algorithms tries to solve the problem of searching if a value exists in an array. Using jump search, we aim to chunk out subsets of the array such that it’ll be more efficient than binary search at filtering through already-sorted arrays. We look for an interval of known greater and lesser elements where our search value might be.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;4. Working with DOM&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Document Object Model (DOM) connects web pages to scripts or programming languages by representing the structure of a document—such as the HTML representing a web page—in memory. Usually it refers to JavaScript, even though modeling HTML, SVG, or XML documents as objects are not part of the core JavaScript language.&lt;/p&gt;

&lt;p&gt;The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree. With them, you can change the document's structure, style, or content.&lt;/p&gt;

&lt;p&gt;Nodes can also have event handlers attached to them. Once an event is triggered, the event handlers get executed.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;5. Asynchronous JavaScript&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;5.1 Promises&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Promise is an object representing the eventual completion or failure of an asynchronous operation. Since most people are consumers of already-created promises, this guide will explain consumption of returned promises before explaining how to create them.&lt;/p&gt;

&lt;p&gt;Essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function.&lt;/p&gt;

&lt;p&gt;Imagine a function, createAudioFileAsync(), which asynchronously generates a sound file given a configuration record and two callback functions, one called if the audio file is successfully created, and the other called if an error occurs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function successCallback(result) {
  console.log("Audio file ready at URL: " + result);
}

function failureCallback(error) {
  console.error("Error generating audio file: " + error);
}

createAudioFileAsync(audioSettings, successCallback, failureCallback);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5.2 promises chaining after a catch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's possible to chain after a failure, i.e. a catch, which is useful to accomplish new actions even after an action failed in the chain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new Promise((resolve, reject) =&amp;gt; {
    console.log('Initial');

    resolve();
})
.then(() =&amp;gt; {
    throw new Error('Something failed');

    console.log('Do this');
})
.catch(() =&amp;gt; {
    console.error('Do that');
})
.then(() =&amp;gt; {
    console.log('Do this, no matter what happened before');
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5.3 Async&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An async function is a function declared with the async keyword, and the await keyword is permitted within it. The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.&lt;/p&gt;

&lt;p&gt;Async functions may also be defined as expressions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function resolveAfter2Seconds() {
  return new Promise(resolve =&amp;gt; {
    setTimeout(() =&amp;gt; {
      resolve('resolved');
    }, 2000);
  });
}

async function asyncCall() {
  console.log('calling');
  const result = await resolveAfter2Seconds();
  console.log(result);
  // expected output: "resolved"
}

asyncCall();

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5.4 Await&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The await operator is used to wait for a Promise. It can only be used inside an async function within regular JavaScript code; however it can be used on its own with JavaScript modules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function resolveAfter2Seconds(x) {
  return new Promise(resolve =&amp;gt; {
    setTimeout(() =&amp;gt; {
      resolve(x);
    }, 2000);
  });
}

async function f1() {
  var x = await resolveAfter2Seconds(10);
  console.log(x); // 10
}

f1();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow for more insights&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>node</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Introduction to Data Structures and Algorithms With Modern JavaScript</title>
      <dc:creator>Daniel Obare</dc:creator>
      <pubDate>Mon, 21 Feb 2022 10:11:53 +0000</pubDate>
      <link>https://dev.to/danielobare/introduction-to-data-structures-and-algorithms-with-modern-javascript-fi0</link>
      <guid>https://dev.to/danielobare/introduction-to-data-structures-and-algorithms-with-modern-javascript-fi0</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Basic Data Structures&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Linked Lists
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LinkedList&lt;/strong&gt; is the dynamic data structure, as we can add or remove elements at ease, and it can even grow as needed. Just like arrays, linked lists store elements sequentially, but don’t store the elements contiguously like an array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// linkedlist class
class LinkedList {
    constructor()
    {
        this.head = null;
        this.size = 0;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above example shows a Linked List class with a constructor and a list of methods to be implemented. Linked List class has two properties: i.e. head and size, where the head stores the first node of a List, and size indicates the number of nodes in a list. &lt;/p&gt;

&lt;h3&gt;
  
  
  Functions to be implemented in the Linked List
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. add(element) – It adds an element at the end of the list.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// adds an element at the end
// of list
add(element)
{
    // creates a new node
    var node = new Node(element);

    // to store current node
    var current;

    // if list is Empty add the
    // element and make it head
    if (this.head == null)
        this.head = node;
    else {
        current = this.head;

        // iterate to the end of the
        // list
        while (current.next) {
            current = current.next;
        }

        // add node
        current.next = node;
    }
    this.size++;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the order to add an element at the end of the list we consider the following : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If the list is empty then add an element and it will be head&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the list is not empty then iterate to the end of the list and add an element at the end of the list&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. insertAt(element, index) – It inserts an element at the given index in a list.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// insert element at the position index
// of the list
insertAt(element, index)
{
    if (index &amp;lt; 0 || index &amp;gt; this.size)
        return console.log("Please enter a valid index.");
    else {
        // creates a new node
        var node = new Node(element);
        var curr, prev;

        curr = this.head;

        // add the element to the
        // first index
        if (index == 0) {
            node.next = this.head;
            this.head = node;
        } else {
            curr = this.head;
            var it = 0;

            // iterate over the list to find
            // the position to insert
            while (it &amp;lt; index) {
                it++;
                prev = curr;
                curr = curr.next;
            }

            // adding an element
            node.next = curr;
            prev.next = node;
        }
        this.size++;
    }
}

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

&lt;/div&gt;



&lt;p&gt;In order to add an element at the given index of the list we consider three conditions as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;if the index is zero we add an element at the front of the list and make it head&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the index is the last position of the list we append the element at the end of the list&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if the index is between 0 or size – 1 we iterate over to the index and add an element at that index&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. removeFrom(index) – It removes and returns an element from the list from the specified index&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// removes an element from the
// specified location
removeFrom(index)
{
    if (index &amp;lt; 0 || index &amp;gt;= this.size)
        return console.log("Please Enter a valid index");
    else {
        var curr, prev, it = 0;
        curr = this.head;
        prev = curr;

        // deleting first element
        if (index === 0) {
            this.head = curr.next;
        } else {
            // iterate over the list to the
            // position to removce an element
            while (it &amp;lt; index) {
                it++;
                prev = curr;
                curr = curr.next;
            }

            // remove the element
            prev.next = curr.next;
        }
        this.size--;

        // return the remove element
        return curr.element;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to remove an element from the list we consider three conditions: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If the index is 0 then we remove the head and make the next node head of the list&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the index is size – 1 then we remove the last element from the list and make prev the last element&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If it’s in between 0 to size – 1 we remove the element by using prev and the current node&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. removeElement(element) – This method removes element from the list. It returns the removed element, or if it’s not found it returns -1.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// removes a given element from the
// list
removeElement(element)
{
    var current = this.head;
    var prev = null;

    // iterate over the list
    while (current != null) {
        // comparing element with current
        // element if found then remove the
        // and return true
        if (current.element === element) {
            if (prev == null) {
                this.head = current.next;
            } else {
                prev.next = current.next;
            }
            this.size--;
            return current.element;
        }
        prev = current;
        current = current.next;
    }
    return -1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above method is just a modification of removeFrom(index), as it searches for an element and removes it, rather than removing it from a specified location&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Helper Methods&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1. indexOf(element) – it returns the index of a given element if the element is in the list.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// finds the index of element
indexOf(element)
{
    var count = 0;
    var current = this.head;

    // iterate over the list
    while (current != null) {
        // compare each element of the list
        // with given element
        if (current.element === element)
            return count;
        count++;
        current = current.next;
    }

    // not found
    return -1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. isEmpty() – it returns true if the list is empty.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// checks the list for empty
isEmpty()
{
    return this.size == 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. size_of_list() – It returns the size of list&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// gives the size of the list
size_of_list()
{
    console.log(this.size);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;4. printList() – It prints the contents of the list. *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// prints the list items
printList()
{
    var curr = this.head;
    var str = "";
    while (curr) {
        str += curr.element + " ";
        curr = curr.next;
    }
    console.log(str);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Arrays
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Array object&lt;/strong&gt;, as with arrays in other programming languages, enables storing a collection of multiple items under a single variable name, and has members for performing common array operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create an Array&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// 'fruits' array created using array literal notation.
const fruits = ['Apple', 'Banana'];
console.log(fruits.length);
// 2

// 'fruits' array created using the Array() constructor.
const fruits = new Array('Apple', 'Banana');
console.log(fruits.length);
// 2

// 'fruits' array created using String.prototype.split().
const fruits = 'Apple, Banana'.split(', ');
console.log(fruits.length);
// 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create an array from string&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana'];
const fruitsString = fruits.join(', ');
console.log(fruitsString);
// "Apple, Banana"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Access an array item by its index&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana'];

// The index of an array's first element is always 0.
fruits[0]; // Apple

// The index of an array's second element is always 1.
fruits[1]; // Banana

// The index of an array's last element is always one
// less than the length of the array.
fruits[fruits.length - 1]; // Banana

// Using a index number larger than the array's length
// returns 'undefined'.
fruits[99]; // undefined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Find the index of an item in an array&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana'];
console.log(fruits.indexOf('Banana'));
// 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check if an array contains a certain item&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana'];

fruits.includes('Banana'); // true
fruits.includes('Cherry'); // false

// If indexOf() doesn't return -1, the array contains the given item.
fruits.indexOf('Banana') !== -1; // true
fruits.indexOf('Cherry') !== -1; // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Append an item to an array&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana'];
const newLength = fruits.push('Orange');
console.log(fruits);
// ["Apple", "Banana", "Orange"]
console.log(newLength);
// 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remove the last item from an array&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['Apple', 'Banana', 'Orange'];
const removedItem = fruits.pop();
console.log(fruits);
// ["Apple", "Banana"]
console.log(removedItem);
// Orange
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Stacks
&lt;/h2&gt;

&lt;p&gt;linear data structure in which addition or removal of element follows a particular order i.e. LIFO(Last in First Out) AND FILO(First in Last Out).&lt;br&gt;
Stacks are basically arrays where the only thing you can do, more or less, is to push and pop.&lt;/p&gt;

&lt;p&gt;Array Declaration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var House = [ ]; // method 1 
var House = new Array(); // method 2 


// Initializing while declaring
var house = ["1BHK", "2BHK", "3BHK", "4BHK"];

var stack = [];
stack.push(2);       // stack is now [2]
stack.push(5);       // stack is now [2, 5]
var i = stack.pop(); // stack is now [2]
alert(i);            // displays 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Queues
&lt;/h2&gt;

&lt;p&gt;Queues are, the first item added to the queue will be the first one taken out of the queue(FIFO). When adding an item into the queue that operation is called enqueuing and when we take out an item from the queue the operation is called dequeuing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var queue = [];
queue.push(2);         // queue is now [2]
queue.push(5);         // queue is now [2, 5]
var i = queue.shift(); // queue is now [5]
alert(i);              // displays 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Trees are another relation-based data structure, which specialize in representing hierarchical structures. Like a linked list, nodes contain both elements of data and pointers marking its relation to immediate nodes.&lt;/p&gt;

&lt;p&gt;Each tree has a “root” node, off of which all other nodes branch. The root contains references to all elements directly below it, which are known as its “child nodes”. This continues, with each child node, branching off into more child nodes.&lt;/p&gt;

&lt;p&gt;Nodes with linked child nodes are called internal nodes while those without child nodes are external nodes. A common type of tree is the “binary search tree” which is used to easily search stored data.&lt;/p&gt;

&lt;p&gt;These search operations are highly efficient, as its search duration is dependent not on the number of nodes but on the number of levels down the tree.&lt;/p&gt;

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

&lt;p&gt;This type of tree is defined by four strict rules:&lt;/p&gt;

&lt;p&gt;a) The left subtree contains only nodes with elements lesser than the root.&lt;br&gt;
b) The right subtree contains only nodes with elements greater than the root.&lt;br&gt;
c) Left and right subtrees must also be a binary search tree. They must follow the above rules with the “root” of their tree.&lt;br&gt;
d) There can be no duplicate nodes, i.e. no two nodes can have the same value.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Graphs
&lt;/h2&gt;

&lt;p&gt;Graphs are a relation-based data structure helpful for storing web-like relationships. Each node, or vertex, as they’re called in graphs, has a title (A, B, C, etc.), a value contained within, and a list of links (called edges) it has with other vertices.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  7. Hash Tables (Map)
&lt;/h2&gt;

&lt;p&gt;Hash tables are a complex data structure capable of storing large amounts of information and retrieving specific elements efficiently. This data structure relies on the concept of key/value pairs, where the “key” is a searched string and the “value” is the data paired with that key.&lt;/p&gt;

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

&lt;p&gt;Each searched key is converted from its string form into a numerical value, called a hash, using a predefined hash function. This hash then points to a storage bucket – a smaller subgroup within the table. It then searches the bucket for the originally entered key and returns the value associated with that key.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>web3</category>
    </item>
    <item>
      <title>JavaScript 101: Introduction to Modern JavaScript Overview. </title>
      <dc:creator>Daniel Obare</dc:creator>
      <pubDate>Sat, 12 Feb 2022 11:50:54 +0000</pubDate>
      <link>https://dev.to/danielobare/javascript-101-introduction-to-modern-javascript-overview-2jof</link>
      <guid>https://dev.to/danielobare/javascript-101-introduction-to-modern-javascript-overview-2jof</guid>
      <description>&lt;p&gt;JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments also use it. JavaScript can be used for Client-side developments as well as Server-side developments. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client-side&lt;/strong&gt;: It supplies objects to control a browser and its Document Object Model (DOM). Like if client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. Useful libraries for the client-side are AngularJS, ReactJS, VueJS and so many others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Server-side&lt;/strong&gt;: It supplies objects relevant to running JavaScript on a server. Like if the server-side extensions allow an application to communicate with a database, and provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. The useful framework which is the most famous these days is node.js.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;
        Basic Example to Describe JavaScript
    &amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;script&amp;gt;
        console.log("Welcome Daniel");
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;External scripts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If we have a lot of JavaScript code, we can put it into a separate file. Script files are attached to HTML with the src attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="/path/to/script.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, /path/to/script.js is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, src="script.js", just like src="./script.js", would mean a file "script.js" in the current folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Code structure&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We can have as many statements in our code as we want. Statements can be separated with a semicolon.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;alert('Hello'); alert('World');&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Variables&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let message;
message = 'Hello!';

alert(message); // shows the variable content
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Data types&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Number&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let n = 123;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;String&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let str = "Hello";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boolean (logical type)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let nameFieldChecked = true; // yes, name field is checked
let ageFieldChecked = false; // no, age field is not checked

``let isGreater = 4 &amp;gt; 1;
alert( isGreater ); // true (the comparison result is "yes")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The “null” value&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let age = null;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The “undefined” value&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let age;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The typeof operator&lt;/strong&gt;&lt;br&gt;
The typeof operator returns the type of the argument. It’s useful when we want to process values of different types differently or just want to do a quick check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;typeof undefined // "undefined"

typeof 0 // "number"

typeof 10n // "bigint"

typeof true // "boolean"

typeof "foo" // "string"

typeof Symbol("id") // "symbol"

typeof Math // "object"  (1)

typeof null // "object"  (2)

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;number&lt;/strong&gt; for numbers of any kind: integer or floating-point, &lt;strong&gt;integers&lt;/strong&gt; are limited by ±(253-1).&lt;br&gt;
&lt;strong&gt;bigint&lt;/strong&gt; is for integer numbers of arbitrary length.&lt;br&gt;
&lt;strong&gt;string&lt;/strong&gt; for strings. A string may have zero or more characters, there’s no separate single-character type.&lt;br&gt;
&lt;strong&gt;boolean&lt;/strong&gt; for true/false.&lt;br&gt;
&lt;strong&gt;null&lt;/strong&gt; for unknown values – a standalone type that has a single value null.&lt;br&gt;
&lt;strong&gt;undefined&lt;/strong&gt; for unassigned values – a standalone type that has a single value undefined.&lt;br&gt;
&lt;strong&gt;object&lt;/strong&gt; for more complex data structures.&lt;br&gt;
&lt;strong&gt;symbol&lt;/strong&gt; for unique identifiers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applications of JavaScript:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Web Development: Adding interactivity and behavior to static sites JavaScript was invented to do this in 1995. By using AngularJS that can be achieved so easily.&lt;br&gt;
Web Applications: With technology, browsers have improved to the extent that a language was required to create robust web applications. When we explore a map in Google Maps then we only need to click and drag the mouse. All detailed view is just a click away, and this is possible only because of JavaScript. It uses Application Programming Interfaces(APIs) that provide extra power to the code. The Electron and React is helpful in this department.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server Applications: With the help of Node.js, JavaScript made its way from client to server and node.js is the most powerful on the server-side.&lt;br&gt;
Games: Not only in websites, but JavaScript also helps in creating games for leisure. The combination of JavaScript and HTML 5 makes JavaScript popular in game development as well. It provides the EaseJS library which provides solutions for working with rich graphics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Smartwatches: JavaScript is being used in all possible devices and applications. It provides a library PebbleJS which is used in smartwatch applications. This framework works for applications that require the internet for its functioning.&lt;br&gt;
Art: Artists and designers can create whatever they want using JavaScript to draw on HTML 5 canvas, make the sound more effective also can be used p5.js library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Machine Learning: This JavaScript ml5.js library can be used in web development by using machine learning.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
