1. Computing

Discuss in my forum

Teach Yourself Javascript in 24 Hours (4th edition) Book Review

by Michael Moncur

About.com Rating 3 Star Rating


Sams Teach Yourself Javascript in 24 Hours (4th edition) by Michael Moncur

Sams Teach Yourself Javascript in 24 Hours (4th edition) by Michael Moncur

Image courtesy PriceGrabber

Bottom Line

This is a great book for beginning web developers who learn through examples. Don’t plan on using this book as a reference, but rather get ready to get your hands dirty typing in code so that you can really learn it.


  • Step-by-step instructions make it easy to move through the book.
  • The length is good to get the chapters done in the alloted time (i.e. 1 hour per chapter for 24 hours total)
  • Covers elements of scripting like best practices that are often left out of other programming books
  • Lots of examples in every chapter to illustrate what you’re learning


  • It is not written as a reference book, and so can be confusing if you’re not already familiar with the terms.
  • You will be expected to read the scripts in the examples and try them out so that you understand them.
  • The book is fairly short so some


  • Publisher: Sams
  • Price: $34.99
  • Length: 442 pages
  • Released: May 2010
  • Section 1 introduces JavaScript with chapters on understanding JavaScript, creating a simple script, programming JavaScript, and working with the DOM.
  • Section 2 gets into the basics of JavaScript with chapters on variables, functions, loops, built-in libraries and more.
  • Section 3 introduces the DOM with chapters about responding to events, windows, forms, style sheets, the W3C, and advanced DOM features.
  • Section 4 gets more advanced with chapters on scripting best practices, debugging, Ajax, and using Greasemonkey.
  • Section 5 teaches how to build multimedia applications with JavaScript including graphics and sound.
  • Section 6 helps you put it all together with three sample scripts (drop-down menus, a game, and other applications) plus where you can go with JavaScript.
  • There is also appendices with JavaScript resources, more JavaScript books, a glossary, and a quick reference for both JavaScript and the DOM.
  • Like the other Sams Teach Yourself books, each chapter is intended to be an hour of work to learn the language. The chapters end with a Q&A section, a quiz and some exercises to practice what you learned that hour.

Jennifer Kyrnin’s Review of Teach Yourself Javascript in 24 Hours (4th edition)

This is a great book for teaching yourself JavaScript. But it’s not for everyone. If you’re looking for a book that explains the JavaScript functions and how to use them you might get frustrated here because while there is a great index, this book is not a reference book. Instead it is intended to take you step-by-step through how to learn JavaScript by actually writing it.

Each chapter is intended to be consumed in about an hour with the reader following along at his or her computer—writing the scripts on web pages as the author presents them.

If you are a person who learns by doing and following examples, then you will really like this book. You are given lots of examples to work with and every hour is finished with a quiz and some exercises to continue further on that topic. For best results I recommend following along with the book and doing most of the exercises at the end of each chapter. This means it will probably take you more than 24 hours to finish the book, but you’ll have a strong grasp of how to use JavaScript by the end.

What I Like Best

The thing I like best about this book is in Hour 15: Unobtrusive Scripting. I’ve seen a lot of books and websites go over how to write JavaScript, but never talk about best practices for where to use it and how best to use it. This book has an entire chapter devoted to just that.

For example, Moncur talks about creating scripts that “follow standards… [and] work even without Javascript.” This is amazing to me. Most scripters seem to feel that if you are going to use JavaScript (or Flash, or ActionScript or whatever) you should only focus on those readers using the browser that they use and don’t bother with people who might be inclined to turn JavaScript off. (And if you’ve read my site, you know that some people do turn scripting off.)

This chapter includes information on progressive enhancement and recommends just like the W3C that you avoid doing things that are specific to one browser (no matter how tempting that may be). It also covers accessibility and usability which is great.

Of course, then this chapter goes into browser sniffing, with the implication that you can (and should?) test for browsers by reading their browser information. But then it redeems itself by covering feature sensing, where you test for a feature (like the CANVAS element) and then run your script or not depending upon whether the user agent supports that feature.

This is a nice book for learning how to build scripts in JavaScript. By trying out all the examples yourself you’ll have a strong understanding of how to do it, although it might take closer to 50 hours to do.

Disclosure: A review copy was provided by the publisher. For more information, please see our Ethics Policy.

©2014 About.com. All rights reserved.