Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


So you're ready to make the leap from writing HTML and CSS web pages to creating dynamic web applications. You want to take your web skills to the next level. And you're finally ready to add "programmer" to the resume. It sounds like you're ready to learn the Web's hottest programming language: JavaScript. Head First JavaScript is your ticket to going beyond copying and pasting the code from someone else's web site, and writing your own interactive web pages.

With Head First JavaScript, you learn:

  • The basics of programming, from variables to types to looping

  • How the web browser runs your code, and how you can talk to the browser with your code

  • Why you'll never have to worry about casting, overloading, or polymorphism when you're writing JavaScript code

  • How to use the Document Object Model to change your web pages without making your users click buttons

If you've ever read a Head First book, you know what to expect -- a visually rich format designed for the way your brain works. Head First JavaScript is no exception. It starts where HTML and CSS leave off, and takes you through your first program into more complex programming concepts -- like working directly with the web browser's object model and writing code that works on all modern browsers.

Don't be intimidated if you've never written a line of code before! In typical Head First style, Head First JavaScript doesn't skip steps, and we're not interested in having you cut and paste code. You'll learn JavaScript, understand it, and have a blast along the way. So get ready... dynamic and exciting web pages are just pages away.

Subscriber Reviews

Average Rating: 3.1333333333333333 out of 5 rating Based on 15 Ratings

"Head First JavaScript " - by Anonymous on 25-APR-2013
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Head First JavaScript is the most fun, easiest to understand and most in-depth book about programming I have ever read. The projects it shows you how to do are so much fun! The drawings, fireside chats between different javascript functions are really so much fun!!
Report as Inappropriate

"Early review (Chapter 2) - php knowledge useful" - by Anne on 25-JUL-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Only on chapter 2 so far ... hence, 3 stars only  - fan of Head First generally.

Just an FYI ...
For the Donuts script in Chapter 2 - <form> is calling a php file. Assuming you would want to see the results of placeOrder ( ) in its entirety, you need to have php running on a server (local server: WAMP for Windows in my case) - put the HF exercise files in C:\wamp\www and using wamp server, call completed one up via http://localhost/your-exercise-files/donuts5.html in order to "run" the order thru php - then it works.

Would have been helpful to have seen that mentioned in Chapter 2  beside said script.

Report as Inappropriate

"Good Book, Lousy Language" - by Kurt on 11-AUG-2010
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I love the Head First series, although this book is not for people who already live in an OO world.  If you know Java and HTML, 60% of this book will be review of basic coding principles.

So, it was the wrong book for me.  But it's very readable and engaging and useful as a teaching tool.  It makes a poor reference (all the Head First books do), but it's not intended to be one, so we can't fault it too much for that.

It also does a good job of addressing JS's myriad weaknesses (duck-typing, lack of testability) without dwelling on them, mocking them, or apologizing for them.

So, overall, good book for someone with little coding experience who wants to get into dynamic pages without jumping straight into GWT.

Report as Inappropriate

"Head First JavaScript" - by GeoChing on 03-AUG-2010
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book does not require the reader to also WRITE javascript.  The code downloads are just numbered versions of the code in the book, but the author does not explain what each version does.

Contrast this with Head First HTML and CSS, which the author makes the reader write the HTML and CSS, which is much better to understand and retain the material.

Very disappointing book!

Report as Inappropriate

"Too old and incorrect" - by Brent Hoover on 09-JUL-2010
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
While I am normally a fan of the Head First series, I actually had to put this book away as the examples and methodologies were just wrong. Many of the examples simply don't work in anything but Safari for Mac which seems to be what the authors used, which makes it simply irrelevant in the actual world.

Too bad, because there needs to be a good, thorough, book for people who really want to understand JavaScript as a language.

Report as Inappropriate

Table of Contents



The publisher has provided additional content related to this title.


Visit the catalog page for Head First JavaScript

  • Catalog Page

Visit the errata page for Head First JavaScript

  • Errata

Download the supplemental electronic content for Head First JavaScript

  • Supplemental Content