<?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: Rohini Bali</title>
    <description>The latest articles on DEV Community by Rohini Bali (@rohinibali).</description>
    <link>https://dev.to/rohinibali</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%2F530822%2F5b2abe8d-f183-4445-8bf2-0168e7ad0372.jpeg</url>
      <title>DEV Community: Rohini Bali</title>
      <link>https://dev.to/rohinibali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohinibali"/>
    <language>en</language>
    <item>
      <title>Getting started with JavaScript : The Definitive Guide : Week2</title>
      <dc:creator>Rohini Bali</dc:creator>
      <pubDate>Thu, 21 Jan 2021 20:51:47 +0000</pubDate>
      <link>https://dev.to/rohinibali/getting-started-with-javascript-the-definitive-guide-week2-4pg1</link>
      <guid>https://dev.to/rohinibali/getting-started-with-javascript-the-definitive-guide-week2-4pg1</guid>
      <description>&lt;h3&gt;
  
  
  Topics Covered in this blog are Objects!
&lt;/h3&gt;

&lt;p&gt;Computer works in a very simple way. It takes input from user, processes it and then provides us with an output. This seems like work of intelligence! It is indeed. But I've to break it to you, computer is a dumb machine it cannot do anything by itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffoylmuwp2o3cg7wibbo8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffoylmuwp2o3cg7wibbo8.gif" alt="Alt Text" width="195" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Computer programs are what makes computer an Intelligent Machine and how does computer program do these things? It manipulates values, the kind of values that are known as types and are one of the fundamental characteristics of a programming language. Also there values are stored within the memory with the help of variable. We will see more about this as we advance through this chapter :&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript types can be divided into two categories
&lt;/h3&gt;

&lt;p&gt;1.Primitive types&lt;br&gt;
2.Object types&lt;/p&gt;

&lt;p&gt;Basically everything in JavaScript is an Object including the Primitive types. And every object has two compulsory characteristics  properties and values. The third characteristic one is optional as it is methods (which basically are nothing but functions related to a particular set of object) because some might require them and some might not.&lt;/p&gt;

&lt;p&gt;JavaScript's &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive" rel="noopener noreferrer"&gt;primitive types&lt;/a&gt; include &lt;br&gt;
1.Numbers&lt;br&gt;
2.Strings&lt;br&gt;
3.Boolean&lt;br&gt;
4.Null&lt;br&gt;
5.Undefined&lt;/p&gt;

&lt;p&gt;Primitive types are basically immutable objects, which means an object whose state &lt;em&gt;cannot be modified after it is created&lt;/em&gt; and are predefined within the language.&lt;br&gt;
You can check the type of the variables or objects using &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof" rel="noopener noreferrer"&gt;typeof&lt;/a&gt; operator in JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwc7mqko74n0c5yxpcful.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwc7mqko74n0c5yxpcful.PNG" alt="Alt Text" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's jump to understand more about Objects. A mutable object is an object whose state can be &lt;em&gt;modified after it is created&lt;/em&gt;. A JavaScript program can change the values of object properties and array elements.&lt;/p&gt;

&lt;p&gt;Let's look at an example I've given here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhbpdyu42ryg5fmzvdv64.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhbpdyu42ryg5fmzvdv64.PNG" alt="Alt Text" width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let Me show you the type person now belongs to:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcahb7pit0cq0id3694yd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcahb7pit0cq0id3694yd.PNG" alt="Alt Text" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  See now we know about objects. More interesting part over here is I can even change the whole object. See this
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fekjb5tauu6j37zozylyz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fekjb5tauu6j37zozylyz.PNG" alt="Alt Text" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2pnno4wc4xp9psqvhqvj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2pnno4wc4xp9psqvhqvj.gif" alt="Alt Text" width="500" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But But But!!!!! take a look at the declaration. I've used &lt;strong&gt;let&lt;/strong&gt; to define my object person. Which means we can change the whole object in a single command. But the thing to keep in mind here is that when we declare a object using &lt;strong&gt;const&lt;/strong&gt; keyword it is not that easy to change the object. Look how the same code threw an Error over here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F49c5pv7v2xz1ytuxypob.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F49c5pv7v2xz1ytuxypob.PNG" alt="Alt Text" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So now the question that would pop-up into your mind would be would it make this person(object) immutable?&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The answer to the above question is &lt;strong&gt;NO&lt;/strong&gt;.
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqumwr9r15q2qlhv8ejs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqumwr9r15q2qlhv8ejs.PNG" alt="Alt Text" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd explain it to you in a simple way. Just suppose yourself as a object with &lt;em&gt;const&lt;/em&gt; declaration. You have some properties which will remain as they are for your entire life such as your name mentioned on your birth-certificate(unless you decide to change it) or the colour of your hair or simply who gave you birth. These things won't change. But yes you can have different age, different hairstyle, different favourite song! &lt;/p&gt;

&lt;p&gt;You can still change the properties of the Obj with const declaration but not all of them together. Here is how you can do it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqumwr9r15q2qlhv8ejs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqumwr9r15q2qlhv8ejs.PNG" alt="Alt Text" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can do this by reassigning each object property individually.&lt;br&gt;
You can study more about how &lt;strong&gt;let&lt;/strong&gt;, &lt;strong&gt;const&lt;/strong&gt; and &lt;strong&gt;var&lt;/strong&gt; works in JavaScript in &lt;a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/" rel="noopener noreferrer"&gt;this link&lt;/a&gt;.&lt;br&gt;
I want to bring your focus to one more thing over here. When we define functions within an particular object they are called &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions" rel="noopener noreferrer"&gt;methods&lt;/a&gt;. Take this for an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fid136kj4170xuydco8r8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fid136kj4170xuydco8r8.PNG" alt="Alt Text" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here fullName is function declared within person object and hence will be called as method of person.&lt;/p&gt;

&lt;p&gt;Now, let's move  forward and see how we can create new objects,&lt;br&gt;
but before we dive deep, it is important to note that JavaScript is an object-based language based on prototypes, rather than being class-based. Because of this different basis, it can be less apparent how JavaScript allows you to create hierarchies of objects and to have an inheritance of properties and their values.&lt;/p&gt;

&lt;p&gt;We can create objects in the following ways given:&lt;/p&gt;

&lt;h4&gt;
  
  
  1.Creation of an object using &lt;strong&gt;constructor&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Constructor is nothing but a function and with help of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new" rel="noopener noreferrer"&gt;new&lt;/a&gt; keyword, constructor function allows to create multiple objects of same blueprint as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fycmdzww8fkn0abnwrzw5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fycmdzww8fkn0abnwrzw5.PNG" alt="Alt Text" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A class is a blueprint for similar type of objects, in OOPs it has two major components, certain parameters and few member functions. In this method we declare a function similar to a class, there are three parameters, brand, designer and country (the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" rel="noopener noreferrer"&gt;this&lt;/a&gt; keyword is used to differentiate brand, designer and country of the class to the brand, designer, country of the arguments that are being supplied.). We then simple create an object tshirt of the type clothes and initialize it. We can see that tshirt object now has properties as of clothes i.e. brand, designer and country.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.Creation of objects using &lt;strong&gt;Object literals&lt;/strong&gt;.
&lt;/h4&gt;

&lt;p&gt;Literals are smaller and simpler ways to define objects. We simply define the property and values inside curly braces as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjq1d276imcpye6awx3r2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjq1d276imcpye6awx3r2.PNG" alt="Alt Text" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As shown in the above code we created a simple object named tshirt with the help of object literal, having properties like brand, designer, country. Then we make use of the property accessor methods(Dot notation, Bracket notation) to console.log the values.&lt;br&gt;
Now let’s see how we can add more properties to an already defined object:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F78xdwqep8zwecmneme7h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F78xdwqep8zwecmneme7h.PNG" alt="Alt Text" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3.Creating object with Object.create() method.
&lt;/h4&gt;

&lt;p&gt;The Object.create() method creates a new object, using an existing object as the prototype of the newly created object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faos92ga8zjmn2rlis4tg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faos92ga8zjmn2rlis4tg.PNG" alt="Alt Text" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.Using es6 classes.
&lt;/h4&gt;

&lt;p&gt;ES6 supports class concept like any other Statically typed or object oriented language. So, object can be created out of a class in javascript as well as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr3l9ehbp8983exmj9cqb.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr3l9ehbp8983exmj9cqb.PNG" alt="Alt Text" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So that's all for this week. Hope you liked it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9bkg6jc4v8qns2j40ntn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9bkg6jc4v8qns2j40ntn.gif" alt="Alt Text" width="400" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you think this article can be improved let me know.🙂&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>devlife</category>
    </item>
    <item>
      <title>Getting started with JavaScript : The Definitive Guide</title>
      <dc:creator>Rohini Bali</dc:creator>
      <pubDate>Wed, 13 Jan 2021 13:41:01 +0000</pubDate>
      <link>https://dev.to/rohinibali/javascript-the-definitive-guide-1l5i</link>
      <guid>https://dev.to/rohinibali/javascript-the-definitive-guide-1l5i</guid>
      <description>&lt;p&gt;I started reading out this book a week ago and here I'm trying to break-up a few things I understood while getting started.&lt;/p&gt;

&lt;h1&gt;
  
  
  Chapter 01 : Introduction to JavaScript.
&lt;/h1&gt;

&lt;p&gt;JavaScript is a high-level, dynamic, interpreted programming language that is well suited to Object oriented and functional programming styles with multi-paradigm. It has curly-bracket syntax, prototype-based object-orientation, and first-class functions. It is basically everywhere around us.&lt;br&gt;
I know what you're thinking. Alright, I accept these are a lot of jargons to take in abruptly. So let's get our feet into the deep waters one foot at a time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkg6q6wuhurbrdmemhdzi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkg6q6wuhurbrdmemhdzi.gif" alt="Alt Text" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is High-level Programming language?&lt;br&gt;
In computer science it can be explained as a programming language that uses abstraction(providing relevant information in a type). Means we all know machine cannot understand natural languages that humans speak. They only understand the binary or machine level language, which consists of only zeroes and ones. Now what earlier software engineers did for us was they kind of made a dictionary in which they wrote down sequences of 0's and 1's so that when we type something in our natural language the machine will have a reference to look up to, to understand what it exactly means in machine level language. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fya1mc5glz772e49yikt7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fya1mc5glz772e49yikt7.png" alt="Alt Text" width="393" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A dynamic programming language is nothing but just a  class of high level programming language in which operations otherwise done at compile-time can be done at run-time. In JavaScript it is possible to change the type of a variable or add new properties or methods to an object while the program is running. This is the ability of a dynamic language.&lt;br&gt;
Interpreters run through a program line by line and execute each command so if a command in JavaScript is executed, that is done in the manner previously mentioned and thus becomes an interpreted language. The point to note here is that in compiled languages that are directly converted into machine code, they tend to be faster than interpreted languages. But with the development of  &lt;a href="https://www.freecodecamp.org/news/just-in-time-compilation-explained/" rel="noopener noreferrer"&gt;JUST-IN-TIME&lt;/a&gt; compilation the gap is shrinking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fabrayi2v84qn3ids76jk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fabrayi2v84qn3ids76jk.png" alt="Alt Text" width="624" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Chapter 02 : Lexical Structure.
&lt;/h1&gt;

&lt;p&gt;When learning any new language one needs to keep in  mind that every language in this world has a particular script and a particular set of defined rules on which the whole language relies upon. Like you know how American English has the same letters as British English but still both are different in ways. Pronunciation, spelling of particular words etc. Similarly in every programming language there is a set of elementary rules that specifies how you write programs in a particular language. This is called &lt;em&gt;lexical structure&lt;/em&gt; or in simple words its syntax. Important points to remember are that :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;JavaScript is a case-sensitive language.&lt;/li&gt;
&lt;li&gt;JavaScript ignores excess whitespace along with line breaks except for those that are a part of string or regular expression literals.&lt;/li&gt;
&lt;li&gt;Currently according to ECMAScript 6 there are total of 48 reserved keywords in JavaScript.&lt;/li&gt;
&lt;li&gt;JavaScript programs are written using the &lt;em&gt;Unicode&lt;/em&gt; character set.&lt;/li&gt;
&lt;li&gt;Semicolons are optional.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Primitive types&lt;/em&gt; (inbuilt or predefined datatypes and methods linked to them).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We will continue to discuss the further chapters.&lt;br&gt;
If you think this article can be improved do let me know. 🙂&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Precedence Rules in CSS3-P2</title>
      <dc:creator>Rohini Bali</dc:creator>
      <pubDate>Sun, 03 Jan 2021 16:08:35 +0000</pubDate>
      <link>https://dev.to/rohinibali/precedence-rules-in-css3-p2-4fhf</link>
      <guid>https://dev.to/rohinibali/precedence-rules-in-css3-p2-4fhf</guid>
      <description>&lt;p&gt;We have already seen how browser will display properties of an HTML document when styling is done using multiple methods. Now we will see how precedence rule works when we declare different properties of selectors, multiple times within a single CSS file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffyarrycktx22kgs1czz2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffyarrycktx22kgs1czz2.PNG" alt="Alt Text" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's focus on the styling of paragraph tag within the HTML file. As you can see that I've also highlighted the styled component of p tag.  We have declared multiple font-families in the paragraph tag.Now the question that arises is which font will be displayed on the browser. Well to answer that question first of all we need to understand the fact that every font is not available within every browser(common font families- predefined in every browser) so if the first-font family if available it will display that. &lt;br&gt;
Here we have &lt;strong&gt;Georgia&lt;/strong&gt; as the font-family which is being displayed in the web browser.&lt;br&gt;
Now let's see what happens if the first font-family is not present within the browser properties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu5ulrzvhxo1z5fjh9h17.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu5ulrzvhxo1z5fjh9h17.PNG" alt="Alt Text" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the browser has rendered font family as &lt;strong&gt;Times New Roman&lt;/strong&gt;. This happened because &lt;strong&gt;Nunito&lt;/strong&gt; is not a common font-family that is available within all the browsers. You can go ahead and search online and see how we display different types of Font-families using a reference to tell the browser from where they can get the font (let's keep that part of discussion for some other day).&lt;br&gt;
So the browser jumped to the next font-family that was provided to make sure that if something goes wrong with the first one, it would know what to do next or else if we don't do that as well, the browser has default settings to display items as per its own properties which are pre-defined within the browser.&lt;br&gt;
Now let's take a look at this example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fduptvxm9loa7lgpkex2q.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fduptvxm9loa7lgpkex2q.PNG" alt="Alt Text" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have defined the properties of paragraph tag multiple times within the CSS file, but as per precedence rules the browser will display the most recent property(which is declared last in the sheet) for the selector (tag) if there are multiple references present within the same stylesheet.&lt;br&gt;
It's just like you made a change and then later you didn't like the property you'd chosen earlier for a particular selector. So you redefined the property without changing the previously defined selector property. Easy! Isn't it?&lt;br&gt;
But what if you want to stick to what you'd written earlier or what if some other person redefines the selector properties and you want to avoid that? In order to make sure that does not happen we can use &lt;strong&gt;!important&lt;/strong&gt; after declaring the property that it is not meant to be updated. This is an important part of precedence that we should always keep in our minds. I've given the example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvlnr237kxyp5bsh9jjh9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvlnr237kxyp5bsh9jjh9.PNG" alt="Alt Text" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all of what I've understood of precedence rules in CSS. Thanks for reading. &lt;br&gt;
If you've any suggestions for how I can improve you can reach out to me. Thank you!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Precedence Rules in CSS3-P1</title>
      <dc:creator>Rohini Bali</dc:creator>
      <pubDate>Sat, 02 Jan 2021 15:26:30 +0000</pubDate>
      <link>https://dev.to/rohinibali/precedence-rules-in-css3-p1-55a6</link>
      <guid>https://dev.to/rohinibali/precedence-rules-in-css3-p1-55a6</guid>
      <description>&lt;p&gt;While styling a single HTML document via cascading style sheets one has to keep in mind the &lt;strong&gt;CSS Precedence&lt;/strong&gt; rule which I used to often get confused with. So let's begin.&lt;br&gt;
We all know that there are typically three ways to style an HTML document. For those who don't know let me tell you that these are:&lt;/p&gt;

&lt;p&gt;1.By Embedding the CSS inside the style attribute of the HTML elements i.e., in the start tag itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F37id1v5ya3910eghh1xw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F37id1v5ya3910eghh1xw.PNG" alt="embedded style attribute within html" width="587" height="26"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.By Embedding CSS inside style HTML element i.e., within the style tag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkkz6gqad5re7on0t6g15.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkkz6gqad5re7on0t6g15.PNG" alt="Alt Text" width="795" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.By linking the External CSS files in the HTML within the head tag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnuekoufo2oqoh1tkxiq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnuekoufo2oqoh1tkxiq.PNG" alt="Alt Text" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the question that arises is what if someone does styling of a single html page using all the methods mentioned above? This is an obvious question that comes to beginner's  mind when they get into web development.&lt;br&gt;
Let's Understand how CSS Precedence rules resolve this by this example here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F329dcdb9r66nyjwgtgxp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F329dcdb9r66nyjwgtgxp.PNG" alt="Alt Text" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Did you see what happened here? We have declared the colour for &lt;strong&gt;h1&lt;/strong&gt; in style tag, in CSS stylesheet which is linked in the head and also within the h1 tag as an attribute. The precedence in CSS works like this :&lt;/p&gt;

&lt;p&gt;a) If nothing is specified for a particular tag, each browser has its own rendering properties which are predefined within them, which is what we usually see when we open a simple HTML document in our browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz1g1lyh3e2oymsz2ea5a.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz1g1lyh3e2oymsz2ea5a.PNG" alt="Alt Text" width="800" height="611"&gt;&lt;/a&gt;&lt;br&gt;
Look carefully we have not linked any stylesheet in the html file.&lt;/p&gt;

&lt;p&gt;b) The browser while rendering the HTML document checks within the head tag for linked stylesheets and if there is one present it will display the contents as prescribed in the stylesheet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foaolp2kjnkkxsjdf1pfz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foaolp2kjnkkxsjdf1pfz.PNG" alt="Alt Text" width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;c) The then proceeds to check for the style tag and the content within the style tag to make the particular changes&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1vnb3qqhpwzlvpu4k0wd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1vnb3qqhpwzlvpu4k0wd.PNG" alt="Alt Text" width="800" height="693"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;d) Finally the browser looks for style contents within the particular tag itself which in our case is h1.As we all can see it has overridden all the other style tag and stylesheet linked with the html.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5tvjzkm82skvp3v54h7i.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5tvjzkm82skvp3v54h7i.PNG" alt="Alt Text" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TO BE CONTINUED...&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
