<?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: Ashray Parmar</title>
    <description>The latest articles on DEV Community by Ashray Parmar (@ashrayparmar).</description>
    <link>https://dev.to/ashrayparmar</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%2F521479%2F1eba4296-0057-422b-a1b2-03268d820fdc.jpeg</url>
      <title>DEV Community: Ashray Parmar</title>
      <link>https://dev.to/ashrayparmar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashrayparmar"/>
    <language>en</language>
    <item>
      <title>Eloquent Javascript Chapter-1</title>
      <dc:creator>Ashray Parmar</dc:creator>
      <pubDate>Mon, 07 Dec 2020 20:59:03 +0000</pubDate>
      <link>https://dev.to/ashrayparmar/eloquent-javascript-chapter-1-2dkh</link>
      <guid>https://dev.to/ashrayparmar/eloquent-javascript-chapter-1-2dkh</guid>
      <description>&lt;h1&gt;
  
  
  Eloquent Javascript Chapter-1
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Computer Language
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Inside the computer’s world, there is only data, computer  only understand the language of 0's and 1's. Data is stored in form of bits&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For example, we can express the number 13 as thirteen but computer don't understand. Here are the bits that make up the number 13, with the weights of the digits shown below them:&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;0    0   0   0   1  1  0  1
128  64  32  16  8  4  2  1 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Javascript Airthmetic Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For Addition we use +&lt;/li&gt;
&lt;li&gt;For Substraction we use  -&lt;/li&gt;
&lt;li&gt;For Division           /&lt;/li&gt;
&lt;li&gt;For Multiplication *&lt;/li&gt;
&lt;li&gt;Modulo oerator to find the remainder %&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Special Numbers
&lt;/h2&gt;

&lt;p&gt;There are three special values in JavaScript that are considered numbers but don’t behave like normal numbers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NaN&lt;/li&gt;
&lt;li&gt;Infinity&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Strings
&lt;/h2&gt;

&lt;p&gt;Strings are used to represent text. They are written by enclosing their content in quotes. We can write a string in three different ways.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;This is first way&lt;/code&gt;&lt;br&gt;
'This is Second way'&lt;br&gt;
"This is third way"&lt;/p&gt;

&lt;p&gt;Majorly backticks is used widely, know why? because you can add anything in between by using this ${} which is called template literal.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var userName = "Javascript"
var string = `Hello ${userName}`

Output 
// Hello Javascript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Comparison
&lt;/h2&gt;

&lt;p&gt;Here is one way to produce Boolean values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(3&amp;gt;2)
-&amp;gt; true
console.log(3&amp;lt;2)
-&amp;gt;false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &amp;gt; and &amp;lt; signs are the traditional symbols for “is greater than” and “is less than”, respectively. There are other similar operators such as &amp;gt;= (greater than equal to), &amp;lt;= (less than equal to)&lt;/p&gt;

&lt;p&gt;Fact: There is only one value in JavaScript that is not equal to itself, and that is NaN (“not a number”).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(NaN == NaN)
-&amp;gt; false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not all operators are symbols. Some are written as words, one example is the typeof operator, which produces a string value naming the type of the value you give it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(typeof 4.5)
// → number
console.log(typeof "x")
// → string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Logical Operator
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&amp;amp;&amp;amp; AND Operator
The &amp;amp;&amp;amp; operator represents logical and. It is a binary operator, and its result is true only if both the values given to it are true.&lt;/li&gt;
&lt;li&gt;|| OR Operator
The || operator denotes logical or. It produces true if either of the values given to it is true.&lt;/li&gt;
&lt;li&gt;! Logical NOT 
Not is written as an exclamation mark (!). It is a unary operator that flips the value given to it—!true produces false, and !false gives true.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ternary Operator
&lt;/h2&gt;

&lt;p&gt;The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;condition ? exprIfTrue : exprIfFalse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Type Coercion
&lt;/h2&gt;

&lt;p&gt;Type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers). Type conversion is similar to type coercion because they both convert values from one data type to another with one key difference — type coercion is implicit whereas type conversion can be either implicit or explicit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var value1 = '5';
var value2 = 9;

var sum = value1 + value2;

console.log(sum);
//Output - 59
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, JavaScript has coerced the 9 from a number into a string and then concatenated the two values together, resulting in a string of 59. JavaScript had a choice between a string or a number and decided to use a string.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>codenewbie</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Git and GitHub</title>
      <dc:creator>Ashray Parmar</dc:creator>
      <pubDate>Sat, 28 Nov 2020 19:29:43 +0000</pubDate>
      <link>https://dev.to/ashrayparmar/git-and-github-3h25</link>
      <guid>https://dev.to/ashrayparmar/git-and-github-3h25</guid>
      <description>&lt;h1&gt;
  
  
  What is Git?
&lt;/h1&gt;

&lt;p&gt;Git is a distributed version-control system for tracking changes in source code during software development. It creates a local repository in our computer in which we will make local changes.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is GitHub?
&lt;/h1&gt;

&lt;p&gt;It is a place where your Local Repository can be uploaded to Remote Repository on GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements?
&lt;/h2&gt;

&lt;p&gt;We need to create an account on GitHub, now it is time that we push our local data to a remote location at GitHub.&lt;/p&gt;

&lt;h1&gt;
  
  
  Git Commands
&lt;/h1&gt;

&lt;p&gt;Let's begin with the most used git commands.&lt;/p&gt;

&lt;p&gt;Where will you type the commands? Open terminal with the project path;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will initialize a local repository in your project folder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This command will add the project files in the staging area which will be ready to commit or push in GitHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will check whether your files are in &lt;strong&gt;Staged area&lt;/strong&gt; or not?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is staged area?
&lt;/h2&gt;

&lt;p&gt;The staging area is a container where git collects all changes which will be part of the next commit it collects all the changes to be committed collectively before they will be pushed to GitHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Commit set a message about the changes you were done. The commit also saves a revision of the code and you can revert the code to any version anytime in one click. We can always add commit message by this command &lt;code&gt;git commit -m "fix"&lt;/code&gt; this message is used if any bug is fixed in the code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git push/pull&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; command is used to transfer or push the commit, which is made on a local branch in your computer to a remote repository like GitHub.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; is a Git command used to update the local version of a repository from a remote, suppose if any other developer made changes in the remote repository by this command you can update it to your local repository.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
