<?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: BINAL MEHTA</title>
    <description>The latest articles on DEV Community by BINAL MEHTA (@binalmehta).</description>
    <link>https://dev.to/binalmehta</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%2F535973%2Fa3a3c881-459f-4ad6-9f81-3e3e533b7e6a.png</url>
      <title>DEV Community: BINAL MEHTA</title>
      <link>https://dev.to/binalmehta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/binalmehta"/>
    <language>en</language>
    <item>
      <title>HTTP Explained ...</title>
      <dc:creator>BINAL MEHTA</dc:creator>
      <pubDate>Fri, 15 Jan 2021 16:40:09 +0000</pubDate>
      <link>https://dev.to/binalmehta/http-explained-58p9</link>
      <guid>https://dev.to/binalmehta/http-explained-58p9</guid>
      <description>&lt;p&gt;Everyone knows about HTTP, we see it at the beginning of every website we come across on the internet. We also know about the HTTP 500 error page whenever there is a problem with the server.&lt;br&gt;
But only a few of us know how exactly HTTP works on the lower level. This is the major takeaway to understand the application's vulnerabilities and will help you to become a better web developer. &lt;br&gt;
So let's dive in!&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is HTTP?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;HTTP stands for &lt;strong&gt;HyperText Transfer Protocol&lt;/strong&gt;.&lt;br&gt;
In simple language, this means that the client(Browser in most cases), makes a request, and waits for the server to respond.&lt;br&gt;
Eg: Browser uses HTTP requests to extract web pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What constitutes a HTTP requests and response&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTTP requests can be seen for any websites on the internet using the chrome (or any browser) developer tools which can be opened using the commands &lt;code&gt;Ctrl + Shift + i / Cmd + Shift + i&lt;/code&gt;. Select the network tab in it.&lt;br&gt;
Detailed information can be seen in the picture below.&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstorage.googleapis.com%2Fcrio-content-container-assets%2FME_ME_HTTP_MODULE_ME_HTTP_MODULE_BYTE1_image_0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstorage.googleapis.com%2Fcrio-content-container-assets%2FME_ME_HTTP_MODULE_ME_HTTP_MODULE_BYTE1_image_0.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
All the images, CSS files, JavaScript, or any other resources the website uses have an HTTP request for each.&lt;br&gt;
There are various other important parameters of information that we can get from the networks tab like headers, Request URL, Request method, status codes etc. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2t2isj86v50628xm1uth.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2t2isj86v50628xm1uth.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F58e6u835mrrmhu86va0a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F58e6u835mrrmhu86va0a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;HTTP Request Methods&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The HTTP request methods get changed at our every action on the internet. But how can we know at what action which request method is implemented?&lt;br&gt;
First things first let's see multiple types of request methods and their functionalities as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GET request:&lt;/strong&gt;&lt;br&gt;
As the name suggests GET requests are used for getting resources from the server. They are used to &lt;em&gt;only fetch data&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;POST request:&lt;/strong&gt;&lt;br&gt;
POST requests play the role of a postman, it sends some data to the server. For example: to submit data from the web form, to upload a file from a server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PUT request:&lt;/strong&gt;&lt;br&gt;
PUT requests are used to update information on the server side. For example: Changing Instagram bio, updating Facebook status etc. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are multiple request methods other than the above such as DELETE, PATCH, OPTIONS, CONNECT, HEAD, TRACE. More information can be found in &lt;a href="https://restfulapi.net/http-methods/" rel="noopener noreferrer"&gt;HTTP Methods&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;HTTP Status Codes&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Status codes are part of the HTTP response. It explains to the user what happened to the request using 3 digit numbers. We have come across various numbers like 400, 500 when a problem occurs at the server side. But what all the numbers mean? Let's understand it!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;2xx range:&lt;/strong&gt;&lt;br&gt;
2xx family i.e. from 200-299 depicts that the HTTP request was successful. Example: when we receive the resource for our request.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq84biml8l9ol8tq6j7tc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq84biml8l9ol8tq6j7tc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;3xx range:&lt;/strong&gt;&lt;br&gt;
3xx family depicts that there is a need for actions or additional steps required by clients to complete a particular request. In most cases, there is URL redirection.&lt;br&gt;
For Example: when we navigate to &lt;a href="http://www.flipkart.com" rel="noopener noreferrer"&gt;http://www.flipkart.com&lt;/a&gt; instead of &lt;br&gt;
&lt;a href="https://www.flipkart.com" rel="noopener noreferrer"&gt;https://www.flipkart.com&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1mcamyeth8iks8zysss2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1mcamyeth8iks8zysss2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;4xx range:&lt;/strong&gt;&lt;br&gt;
We have come across this status code multiple times. It depicts that it had an error while making the HTTP request. In other words, we get this status code when the Syntax of the HTTP request is incorrect or the username or password is invalid. For example, we get this 4xx status code when we enter an invalid website or make an invalid request.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are other multiple status codes as well like 1xx depicts information, 5xx depicts a server error, or when the server is overloaded with requests. You can find more status code on &lt;a href="https://dynomapper.com/blog/254-the-6-types-of-http-status-codes-explained" rel="noopener noreferrer"&gt;HTTP status codes&lt;/a&gt;. Or on &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" rel="noopener noreferrer"&gt;HTTP status codes explained&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2xx-👍&lt;br&gt;
3xx-👉&lt;br&gt;
4xx-👎&lt;br&gt;
5xx-💩&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://personal.ntu.edu.sg/ehchua/programming/webprogramming/HTTP_Basics.html" rel="noopener noreferrer"&gt;HTTP 101&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/a/630475/9734484" rel="noopener noreferrer"&gt;HTTP: PUT vs POST&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it! Thank you for coming this so far. Now you know the basics of HTTP.&lt;br&gt;
Important takeaways are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP is a text-based protocol.&lt;/li&gt;
&lt;li&gt;It is made of requests and responses.&lt;/li&gt;
&lt;li&gt;It's responses have status codes.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>http</category>
      <category>https</category>
    </item>
    <item>
      <title>Eloquent Javascript - Chapt 1</title>
      <dc:creator>BINAL MEHTA</dc:creator>
      <pubDate>Thu, 10 Dec 2020 04:19:45 +0000</pubDate>
      <link>https://dev.to/binalmehta/eloquent-javascript-chapt-1-5bcc</link>
      <guid>https://dev.to/binalmehta/eloquent-javascript-chapt-1-5bcc</guid>
      <description>&lt;h5&gt;
  
  
  In this article I will retrospect the first chapter of the book "Eloquent Javascript"
&lt;/h5&gt;

&lt;h1&gt;
  
  
  Table of Contents:
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt; Bits&lt;/li&gt;
&lt;li&gt; Values&lt;/li&gt;
&lt;li&gt; Numbers&lt;/li&gt;
&lt;li&gt; Precedence of the operator&lt;/li&gt;
&lt;li&gt; Special Numbers&lt;/li&gt;
&lt;li&gt; Strings and Character Escaping&lt;/li&gt;
&lt;li&gt; Ternary operator&lt;/li&gt;
&lt;li&gt; Difference between null and undefined (Empty 
values)&lt;/li&gt;
&lt;li&gt; Type coercion&lt;/li&gt;
&lt;li&gt;Short-circuit operators&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Bits&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In this computer world we are enveloped with the only data, and data comprises of Bits.&lt;br&gt;
In simple words, bits are the combination of zeros and ones which we also called as the decimal number system.&lt;/p&gt;

&lt;p&gt;For example: If we want to demonstrate "95" in bits which we want to convert into decimal number then its binary value would be &lt;code&gt;01011111&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;..  256 128 64 32 16 8 4 2 1 
      0   0  1  0  1 1 1 1 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And its non-zero digits would be &lt;code&gt;64+16+8+4+2+1&lt;/code&gt; which adds upto 95.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8 bits represents 1 byte.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Values&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Volatile and Non-volatile Memory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Volatile Memory&lt;/em&gt; requires power to hold onto the stored information. It is a temporary storage where all the information is erased when the computer is switched off. It is also called as &lt;strong&gt;primary memory&lt;/strong&gt;.&lt;br&gt;
Example: RAM, HDD, SSD etc.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Non-volatile memory&lt;/em&gt; is called as the permanent storage and which do not require power for the information to be static. Even if the computer switches off the information remains unvarying. It is also said to be &lt;strong&gt;secondary memory&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Values in simple words is the ocean of bits which is often divided into &lt;strong&gt;chunks&lt;/strong&gt; to store preventing the loss.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Javascript just call a value and you have one.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Numbers&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Javascript has a fixed 64 bits to store a single number value.&lt;/li&gt;
&lt;li&gt;Javascript does not have types of numbers as in other programming languages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Can we store Negative numbers in that bit?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The answer is YES!, one bit has the sign of that number. Bit firstly it will be converted into the binary format and then its 2's complement will be taken into consideration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also the Fractional numbers can be stored, but they are stored in the form of dot. the calculation of the fractional numbers would not be always precise.&lt;br&gt;
example: &lt;code&gt;39.48&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In numbers we can also scientific notation.&lt;br&gt;
example: &lt;code&gt;2.458e9&lt;/code&gt;&lt;br&gt;
where e(for exponent) followed by the exponent of the number.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Precedence of the Operators&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Precedence&lt;/em&gt; of the operators means how and in which order the arithmetic operations will be executed.&lt;/li&gt;
&lt;li&gt;The precedence is followed by the common rule of &lt;strong&gt;BODMAS&lt;/strong&gt; which stands for Bracket Order Division Multiplication Addition Subtraction.&lt;/li&gt;
&lt;li&gt;When there are same precedence operators  in the problem then it is executed from left to right.&lt;/li&gt;
&lt;li&gt;%(remainder or modulo) have the same precedence as of Multiplication and division.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Special Numbers&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Special Numbers have three special values in JS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Infinity and Negative Infinity&lt;/strong&gt;
The &lt;code&gt;infinity&lt;/code&gt; comes into play when the magnitude of the operation is much larger or something is divided by 0.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The initial value of value of &lt;code&gt;infinity&lt;/code&gt;(positive infinity) is &lt;code&gt;greater&lt;/code&gt; than any other number&lt;br&gt;
The initial value of &lt;code&gt;Negative Infinity&lt;/code&gt; is &lt;code&gt;smaller&lt;/code&gt; than any other number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; infinity + 1
infinity

&amp;gt; 10^1000
infinity

&amp;gt; log(0)
- infinity

&amp;gt; 1 / infinity
infinity

&amp;gt; 1 / 0
infinity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can use it using the following commands:&lt;br&gt;
&lt;code&gt;Number.NEGATIVE_INFINITY&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Number.POSITIVE_INFINITY&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NaN&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;NaN(Not a Number) is itself a number
The following expressions results into NaN.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; sqrt(-2)
NaN

&amp;gt; 8**NaN
NaN

&amp;gt; 0*infinity 
NaN

&amp;gt; undefined + undefined
NaN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;NaN is the only number that is not equal to itself.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Strings and Character Escaping&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Strings can be enclosed in quotes such as&lt;br&gt;
&lt;code&gt;single quotes&lt;/code&gt;, &lt;code&gt;double quotes&lt;/code&gt;, &lt;code&gt;backticks&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The escaping character is used using backslash(). \ is called as escape sequence.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;\b: backspace&lt;br&gt;
 \f: form feed&lt;br&gt;
 \n: new line&lt;br&gt;
 \t: horizontal tab&lt;br&gt;
 \v: vertical tab&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Comparison and Logical Operators&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Comparison operators are used to determine equality or difference between different values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They are binary operators. In JavaScript when we compare strings the characters goes from left to right, based on the Unicode convention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Comparison operators includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;==&lt;/code&gt;   Equal to&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;===&lt;/code&gt;  Equal value/type&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!=&lt;/code&gt;   not equal&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!==&lt;/code&gt;  not equal value/type&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;gt;&lt;/code&gt;    Greater than&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;&lt;/code&gt;    Less than&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;gt;=&lt;/code&gt;   Greater than or equals to&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;=&lt;/code&gt;   Less than or equals to&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;JavaScript offers three logical operators&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;  and&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;||&lt;/code&gt;  or&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!&lt;/code&gt;   not&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Ternary Operator&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Ternary operator in JavaScript contains three operators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax: &lt;code&gt;condition ? valisTru : valisFal&lt;/code&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var status = (age &amp;gt;= 18) ? 'adult' : 'minor';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the condition is true then &lt;code&gt;valisTru&lt;/code&gt; will be executed otherwise &lt;code&gt;valisFal&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Difference between null and undefined(Empty values)&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;These are values but they contain no information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Undefined is when the value have not been assigned to the variable.&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;var(c);
console.log(c);
// undefined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Null is the value which is empty or which does not exists.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var c = null;
console.log(c);
// null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Type coercion&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In JavaScript if we assign wrong value to the operator then it automatically assigns the value which we do not expect without giving any error,&lt;br&gt;
This is called as &lt;code&gt;type coercion&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Examples:&lt;br&gt;
When something do not map in a number in this case "Six" and is converted into number will result into NaN.&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;gt; console.log("six" * 2);
NaN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Arithmetic operation will keep producing NaN on operations on NaN.&lt;/li&gt;
&lt;li&gt;Type conversion is similar to type coercion because they convert one data type to another but the difference is Type coercion is only implicit but type conversion can be implicit or explicit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Short-circuit Evaluation&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The logical operators i.e. || and &amp;amp;&amp;amp; evaluate from left to right and they &lt;strong&gt;short-circuit&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example:&lt;br&gt;
When the below command is executed the OR operation return true if the statement is true.&lt;br&gt;
If the first operand is true then the JavaScript short-circuit do not move forward to the second operand.&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;console.log("Agnes" || "user")
// → Agnes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So this is it! This article was my review of the first chapter of the Eloquent JavaScript Chapter-1 and what I learned from it.&lt;/p&gt;

&lt;p&gt;This is Blogging Challenge from #teamtanayejschallenge&lt;/p&gt;

&lt;p&gt;Thankyou for coming this far. I hope this helps.&lt;br&gt;
Enjoy reading.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Git for Newbies</title>
      <dc:creator>BINAL MEHTA</dc:creator>
      <pubDate>Tue, 08 Dec 2020 08:11:14 +0000</pubDate>
      <link>https://dev.to/binalmehta/git-for-newbies-jm0</link>
      <guid>https://dev.to/binalmehta/git-for-newbies-jm0</guid>
      <description>&lt;p&gt;Many of you especially beginners are confused about Git.&lt;br&gt;
On Google there are millions of answers that explains about the concept of Git.&lt;/p&gt;

&lt;p&gt;The technical definition about Git says that &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is a &lt;strong&gt;Version Control System (VCS)&lt;/strong&gt; for tracking source code during Software Development.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is a VCS?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;A Version Control System in simple words can be regarded as a Source Code Management(SCM), which typically manages your different version of your information(i.e your source code).&lt;/p&gt;

&lt;p&gt;It keeps track of your modifications done to your code and record the changes you made to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;But there are different types of Version Control Systems&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Local Version Control System&lt;/em&gt; - It has a database system that manages the track. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Centralized Version Control System&lt;/em&gt; - Where all the users connect to a master(central) repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Distributed Version Control System&lt;/em&gt; - Where all the users can connect to multiple repositories at a time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Important Git Terminologies&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: &lt;br&gt;
In simple words, repo/repository is a type of container where we store something. Technically it is a data structure which is used by VCS where metadata of our code files and directories are stored. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt;:&lt;br&gt;
Commit is a simple collection of message that explains more about the source code files and how we came to that stage. It can reminds you your intention behind changing those files, It can also help the user that uses your repo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Branch&lt;/strong&gt;:&lt;br&gt;
Think this as a simple tree branch which diverges from the main root, similarly git branch is the version of repo that divide from the main repository. In branch repo we can make various changes like:list, delete, rename etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt;:&lt;br&gt;
Cloning in git means making a copy of the target repo and duplicating all the files of the target repo. Clone is the git command line utility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Index&lt;/strong&gt;:&lt;br&gt;
Index in git is also know as Staging area/Staging Index. A file in the Git directory that stores information about what will go into your next commit. Files on the Staging Index are poised to be added to the repository. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Push and Pull request&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Git push&lt;/strong&gt; will take all your files from the local repo and will push it to the main repo for example on Github.&lt;br&gt;
&lt;strong&gt;Git pull&lt;/strong&gt; is used when you want to pull the latest changes in your main repo.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Commands for using Git in Command Line&lt;/strong&gt;
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/strong&gt; - To initialize or create a repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git add.&lt;/code&gt;&lt;/strong&gt; - To add your code files to your repo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/strong&gt; - To view your files in the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git commit -m 'your message'&lt;/code&gt;&lt;/strong&gt; - To add commit messages to your code files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git push -u origin master&lt;/code&gt;&lt;/strong&gt; - To push the code in your main repository or target repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git pull 'remote_name' 'branch_name'&lt;/code&gt;&lt;/strong&gt; - It will pull the contents from the main repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git fetch&lt;/code&gt;&lt;/strong&gt; - It will fetch the recent commits from the main repo to your local repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git merge&lt;/code&gt;&lt;/strong&gt; - It will merge the branch from remote to local repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git clone repoLink&lt;/code&gt;&lt;/strong&gt; - To clone the target repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So That's it for Git, I hope this article will help you with your learning and will be your easy to read guide. Let me know if this article helps you.&lt;br&gt;
Go on and create your first project on Github with the help of this article.🙂&lt;/p&gt;

&lt;p&gt;Hope you enjoyed reading. ❤️&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
