Learning And Using JavaScript Eloquently

Spread the love

First, let me disabuse you of the notion that “JavaScript” and “Java” are totally unrelated to each other other than having the word “Java” in both. That is a bit of revisionist history that serves no real purpose. On the other hand, JavaScript is not a scripty version of Java by any means. The two are different languages, developed independently, for very different purposes. The overlap or connection stems in part from the fact that early thinking about getting a language to program stuff inside browsers was happening when Java was emerging, and Java would be likely considered the default language to use for such a think, if a full blow real life language would ever be considered for this task. JavaScript have elements that look like Java, and was created by Brendan Eich to use instead of Java and it was, at the time, called Mocha, which is a coffee drink and Java is coffee and they drank a lot of coffee so….)

The fact that this is a falsehood, however, is irrelevant. JavaScript is not Java (though they have a mingled early history of a sort) and JavaScript is the language you are likely to use if you want to program stuff inside a web browser.

There is already a lot of stuff programmed into pages viewed by browsers, so knowing something about JavaScript is probably something you want if you are messing around at all in this area, even if just to fix stuff up or adapt it. And, a good way to do that is to get a hold of Marijn Haverbeke’s new book Eloquent JavaScript, 3rd Edition: A Modern Introduction to Programming.

Everybody hates JavaScript, including, it would seem, its creator (see video below) and Haverbeke, the author of this book. But they also love it, and use it, and know about it, as well should you, probably (if you are reading this far). The book lays out the basics of how the language works, then guieds you through sticking JavaScript stuff into your browser. In particular, Haverbeke goes through a number of very instructive and exemplary examples. There is a pretty good chance that something you want to create, modify, or fix, relates in some way to one or more of the small projects in the book, and from there, you can understand and recode or create as you need to.

The book also covers Node.js.

Here is the TOC:

Table of contents
Introduction

Part I: Language

Chapter 1: Values, Types, and Operators
Chapter 2: Program Structure
Chapter 3: Functions
Chapter 4: Data Structures: Objects and Arrays
Chapter 5: Higher-Order Functions
Chapter 6: The Secret Life of Objects
Chapter 7: Project: A Robot
Chapter 8: Bugs and Errors
Chapter 9: Regular Expressions
Chapter 10: Modules
Chapter 11: Asynchronous Programming
Chapter 12: Project: A Programming Language

Part II: Browser

Chapter 13: JavaScript and the Browser
Chapter 14: The Document Object Model
Chapter 15: Handling Events
Chapter 16: Project: A Platform Game
Chapter 17: Drawing on Canvas
Chapter 18: HTTP and Forms
Chapter 19: Project: A Pixel Art Editor

Part III: Node

Chapter 20: Node.js
Chapter 21: Project: Skill-Sharing Website
Chapter 22: JavaScript and Performance

Marijn Haverbeke┬áis a programming language enthusiast and polyglot. He’s worked on a wide range of software systems, from databases to compilers to editors. He runs a small business around his open source projects.

Have you read the breakthrough novel of the year? When you are done with that, try:

In Search of Sungudogo by Greg Laden, now in Kindle or Paperback
*Please note:
Links to books and other items on this page and elsewhere on Greg Ladens' blog may send you to Amazon, where I am a registered affiliate. As an Amazon Associate I earn from qualifying purchases, which helps to fund this site.

Spread the love

Leave a Reply

Your email address will not be published.