<?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: Priyanshu</title>
    <description>The latest articles on DEV Community by Priyanshu (@priyanshu769).</description>
    <link>https://dev.to/priyanshu769</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%2F533736%2Fa8bc63ce-ff13-47ea-a052-4951026d7366.jpeg</url>
      <title>DEV Community: Priyanshu</title>
      <link>https://dev.to/priyanshu769</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/priyanshu769"/>
    <language>en</language>
    <item>
      <title>Values, Types, Operators in JavaScript - Eloquent JavaScript Chapter 1</title>
      <dc:creator>Priyanshu</dc:creator>
      <pubDate>Sun, 06 Dec 2020 19:19:29 +0000</pubDate>
      <link>https://dev.to/priyanshu769/values-types-operators-javascript-eloquent-javascript-chapter-1-3i4m</link>
      <guid>https://dev.to/priyanshu769/values-types-operators-javascript-eloquent-javascript-chapter-1-3i4m</guid>
      <description>&lt;p&gt;Reading has been fun but reading this book is something new experience as I know the basics of JavaScript and this book is making me revise all the concepts once again. I like it.&lt;br&gt;
By the way I've completed the first chapter and here is the short summary blog from the first chapter.&lt;/p&gt;

&lt;p&gt;I started reading it as there's a challenge for us which is called &lt;a href="https://ejs-challenge.netlify.app/"&gt;#teamtanayejschallenge&lt;/a&gt; where we have to read the book in ten days and write a summary blog for each chapter. As it's a summary blog I won't be including whole chapter here but give you an overall understanding.&lt;/p&gt;

&lt;p&gt;Whatever we see on the internet, it's all data and it needs to be stored somewhere, so it's stored in Bits. Bits are small particles like atoms. It can be particles in your Compact Disk or Hard Disk. A modern computer has over 30 billion bits. If we start using them all at once, we can go out of memory and our program will elapse.&lt;/p&gt;

&lt;p&gt;Now as you know bits are used to store data so to manage them well, we need to store them in small chunks.That's why  we need to specify those bits in small chunks. Now in JavaScript too, we need to store data in small chunks and those chunks are called values.&lt;br&gt;
Values can be numbers, text or functions (whatever can be useful). And to use them we have to name them, so we don't get lost in the crowd of &lt;em&gt;values&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Numbers
&lt;/h2&gt;

&lt;p&gt;Javascript uses fixed amount of bits to store values, and they use 64 of them to just store single numbers. THey are used to store everything related to the number like negative or positive, decimal values and if the number exceeds a certain amount, it starts adding an e for exponent.&lt;br&gt;
Exponent means&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2.998e8
2.998 × 10(to the power 8) = 299,800,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now numbers contain arithmetics, it is also stored there for uses and can be used similarly as it's done in mathematics but the % symbol is a little different here. It gives you the remainder of two numbers for example (269 % 50 produces 19).&lt;br&gt;
Here comes the special numbers like &lt;em&gt;infinity&lt;/em&gt; and &lt;em&gt;-infinity&lt;/em&gt; which renders as NaN. Also &lt;em&gt;zero/zero&lt;/em&gt; renders as NaN. Here NaN means "Not a Number". It can also include any number which doesn't provide a meaningful result.&lt;/p&gt;
&lt;h2&gt;
  
  
  Strings
&lt;/h2&gt;

&lt;p&gt;Strings are text written in backtick-quotes, single quotes or double quotes. They lie in a string until they end with the same kind of quote they started.&lt;br&gt;
Single and double quoted texts can be used to concatenate which means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Pri" + "ya" + "nshu"
// Which will result in Priyanshu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the backtick-quoted ones can do a little more and is often used. The same thing can be written like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pri${ya}nshu
// This will also result in Priyanshu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Unary Operators
&lt;/h2&gt;

&lt;p&gt;Some operators are written as words which renders strings. For example typeof which outputs the type of the value you put to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boolean Values
&lt;/h2&gt;

&lt;p&gt;They are simple like "Yes" or "No". JavaScript has just two of them which is "&lt;em&gt;true&lt;/em&gt;" or "&lt;em&gt;false&lt;/em&gt;". Let's see some code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a = 9
let b = 7
// now here we will log two methods and see what it'll render
console.log(a&amp;lt;b)
console.log(a&amp;gt;b)
// Here JavaScript will render the first log as "false" and the second log as "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are also more similar comparisons (=, !=, ==, &amp;lt;=, &amp;gt;=), which I would like that you read it yourself in the book.&lt;/p&gt;

&lt;h2&gt;
  
  
  Empty Values
&lt;/h2&gt;

&lt;p&gt;Whenever you try to get an output of a empty value, JavaScript knows that and renders "null" as result to let you know that there's no value and it's empty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automatic type conversion
&lt;/h2&gt;

&lt;p&gt;Once you log a program. You expect result, so JavaScript tries to run all kinds of program that you wrote and want to execute. It checks for the code and returns whatever the result is. You can see the code below and see what it means.&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(8 * null)
// → 0
console.log("5" - 1)
// → 4
console.log("5" + 1)
// → 51
console.log("five" * 2)
// → NaN
console.log(false == 0)
// → true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;This code is copied from the book itself.&lt;/code&gt;&lt;br&gt;
Whenever something goes wrong and you are missing on some code, you can check for the log (if you have logged it) and correct your mistakes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Logical operators
&lt;/h2&gt;

&lt;p&gt;Operators like &amp;amp;&amp;amp; and || checks your code and renders the data whichever is true over there.&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(null || "user")
// → user
console.log("Agnes" || "user")
// → Agnes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;This code is copied from the book itself.&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Words
&lt;/h2&gt;

&lt;p&gt;This was all from the chapter one of the &lt;a href="https://eloquentjavascript.net/"&gt;book&lt;/a&gt;.&lt;br&gt;
All you read in this blog are basics, you can read more about them &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you liked the blog then "f" in the chat (comments) please.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once again, it's for a blogging challenge where we have to read the book and write a blog for each chapter.&lt;br&gt;
&lt;a href="https://ejs-challenge.netlify.app/"&gt;Go to the challenge web page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would like to hear from you about these topics. Also you can add something in comments if you want to share. For specific conversation you can &lt;a href="https://www.twitter.com/priyanshu769"&gt;tweet to me&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>books</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Intro to Eloquent Javascript</title>
      <dc:creator>Priyanshu</dc:creator>
      <pubDate>Sat, 05 Dec 2020 18:32:06 +0000</pubDate>
      <link>https://dev.to/priyanshu769/intro-to-eloquent-javascript-3b5m</link>
      <guid>https://dev.to/priyanshu769/intro-to-eloquent-javascript-3b5m</guid>
      <description>&lt;p&gt;I have read a few fiction novels but never came across any book related to programming language. This is the first time I'm reading something like this. I believe that you learn coding by doing projects not reading books or even watching videos. They are good for understanding and stuff. As I was stuck with MDN and videos for four weeks straight and what it taught me was a lot of basics but I could just write a program for to-do list without a delete button.&lt;/p&gt;

&lt;p&gt;I still believe the same but I started reading it as there's a challenge for us which is called &lt;a href="https://ejs-challenge.netlify.app/" rel="noopener noreferrer"&gt;#teamtanayejschallenge&lt;/a&gt; where we have to read the book in ten days and write a summary blog for each chapter. As it's a summary blog I won't be including whole chapter here but give you an overall understanding of the chapter and not make it stuffed like a &lt;em&gt;"fat burger whose ingredients are falling off"&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;I may not complete the challenge but I'll have a few chapters on my side.&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;So all of my story and the challenge details are done. Now I'll head towards the introduction of the book.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&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%2F95dpngfqhdc901brrp5b.jpg" 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%2F95dpngfqhdc901brrp5b.jpg" alt="Binary Codes"&gt;&lt;/a&gt;&lt;br&gt;
Earlier all the programming was done in binary numbers which includes only '0's and '1's. For just writing a program to add numbers from 1 to 10, you have to write zeros and ones multiple times like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;00110001 00000000 00000000
00110001 00000001 00000001
00110011 00000001 00000010
01010001 00001011 00000010
00100010 00000010 00001000
01000011 00000001 00000000
01000001 00000001 00000001
00010000 00000010 00000000
01100010 00000000 00000000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;this is copied from the book as I don't understand binary language yet&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remembering the places of all the zeros and ones seems like a &lt;strong&gt;task&lt;/strong&gt;. It presents itself as a piece of art which only masters can perform.&lt;/p&gt;

&lt;p&gt;So when people figured this out they started making programming languages which includes some words from the languages that human speak so that it can be written and understood by humans easily.&lt;br&gt;
Here is the same code in &lt;strong&gt;JavaScript&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 total = 0, count = 1;
while (count &amp;lt;= 10) {
  total += count;
  count += 1;
}
console.log(total);
// → 55
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;again this is copied from the book as I didn't wanted to type it&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The JavaScript
&lt;/h2&gt;

&lt;p&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%2Fezy6kn7smb8v1ape8myf.jpg" 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%2Fezy6kn7smb8v1ape8myf.jpg" alt="JavaScript"&gt;&lt;/a&gt;&lt;br&gt;
Now, about the language itself. JavaScript has completed 25 years as it's birthday was just day before yesterday (4th of December)and was created in 1995.&lt;br&gt;
&lt;code&gt;&amp;lt;i still regret that i didn't tweeted Happy Birthday JS. I would have accumulated some likes&amp;gt;&lt;/code&gt;😅&lt;/p&gt;

&lt;p&gt;JavaScript was made for browsers so that browsers can read a program and interpret it for users. When it was made and launched, the language "JAVA" was gaining a lot of popularity and that's why the creators decided to have the name "JavaScript" to take the same ride which the other language is having.&lt;br&gt;
Now let it be clear that both the languages has nothing to do with each other and both are different and useful in their own way. JAVA is used to make applications that can run on a virtual machine like a mobile phone and JavaScript is used to make applications that can run on a browser.&lt;/p&gt;

&lt;p&gt;JavaScript has got many updates and the major update was ES6 whose features has got a lot of popularity and is used often. After that it has got a lot of updates. You can read more &lt;a href="https://www.w3schools.com/js/js_versions.asp" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codes
&lt;/h2&gt;

&lt;p&gt;Code is all that you write in your text editor to make a program that can run. Also it doesn't contain binary language and uses words of english with proper syntax.&lt;br&gt;
Once a CEO said &lt;strong&gt;"Coding is just broken english"&lt;/strong&gt;.&lt;br&gt;
Now as this book suggests that what you've to do is code as this book is gonna have a lot of codes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As I said, one needs "to code" to "learn to code". It'll take time but it's possible.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Book
&lt;/h2&gt;

&lt;p&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%2Fscxunwqmdu4huqub513g.jpg" 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%2Fscxunwqmdu4huqub513g.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
The book contains 21 chapters which is divided into three parts. The first part contains simple JavaScript (13 chapters), the second part contains information about web browsers and tools to be used (7 chapters) and the third part contains just the Node.JS (2 chapters).&lt;/p&gt;

&lt;p&gt;This was the summary of the book. I've just overviewed the book not explained it line by line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Words
&lt;/h2&gt;

&lt;p&gt;This was all from the Introduction section of the &lt;a href="https://eloquentjavascript.net/" rel="noopener noreferrer"&gt;book&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you liked the blog then "f" in the chat (comments) please.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once again, it's for a blogging challenge where we have to read the book and write a blog for each chapter.&lt;br&gt;
&lt;a href="https://ejs-challenge.netlify.app/" rel="noopener noreferrer"&gt;Go to the challenge web page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would love to know the critic side of yours, you can &lt;a href="https://www.twitter.com/priyanshu769" rel="noopener noreferrer"&gt;tweet to me&lt;/a&gt;. We can also have a discussion over anything(untill we both are learning), maybe you can teach me something.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>books</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
