DEV Community

Cover image for Intro to Eloquent Javascript
Priyanshu
Priyanshu

Posted on • Updated on

Intro to Eloquent Javascript

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.

I still believe the same but I started reading it as there's a challenge for us which is called #teamtanayejschallenge 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 "fat burger whose ingredients are falling off".

I may not complete the challenge but I'll have a few chapters on my side.

So all of my story and the challenge details are done. Now I'll head towards the introduction of the book.

Intro

Binary Codes
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.

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
Enter fullscreen mode Exit fullscreen mode

<this is copied from the book as I don't understand binary language yet>

Remembering the places of all the zeros and ones seems like a task. It presents itself as a piece of art which only masters can perform.

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.
Here is the same code in JavaScript.

let total = 0, count = 1;
while (count <= 10) {
  total += count;
  count += 1;
}
console.log(total);
// → 55
Enter fullscreen mode Exit fullscreen mode

<again this is copied from the book as I didn't wanted to type it>

The JavaScript

JavaScript
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.
<i still regret that i didn't tweeted Happy Birthday JS. I would have accumulated some likes>😅

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.
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.

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 here.

Codes

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.
Once a CEO said "Coding is just broken english".
Now as this book suggests that what you've to do is code as this book is gonna have a lot of codes.

As I said, one needs "to code" to "learn to code". It'll take time but it's possible.

The Book

Alt Text
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).

This was the summary of the book. I've just overviewed the book not explained it line by line.

Final Words

This was all from the Introduction section of the book.

Now

If you liked the blog then "f" in the chat (comments) please.

Once again, it's for a blogging challenge where we have to read the book and write a blog for each chapter.
Go to the challenge web page.

I would love to know the critic side of yours, you can tweet to me. We can also have a discussion over anything(untill we both are learning), maybe you can teach me something.

Top comments (0)