Welcome to the companion Web pages for the book Modern JavaScript: Develop and Design, written by Larry Ullman and published by Peachpit Press (ISBN 0-321-81252-2). The book was published in February 2012.
Modern JavaScript: Develop and Design was written to teach JavaScript as a complete programming language. The book does so using practical examples and emphasizing approaches that represent how the language should truly be used today. You’ll learn sound Web development theory, relying heavily upon unobtrusive JavaScript, progressive enhancement, and object detection, among other concepts. At the same time, you’ll also walk away with plenty of usable code and many examples that are applicable to today’s Web. There’s even a chapter on using JavaScript and PHP together to create a complete, functional, and reliable Web application (the basis of an auction site).
Other Resources
Beside the handful of pages dedicated to this book, there’s plenty of other content on LarryUllman.com in which you might be interested. Use the “Post Categories” links above to browse by general topic. Any post that’s pertinent specifically to this edition of this book will also have the “jsdd” tag (also accessible through the “Extras” link on right).
Downloads
You can download the code for the book using the link below. If you have any questions or problems, I’d recommend using the book’s corresponding support forum, where you’ll get the fastest answer. Some things you should know:
- Although these scripts are named as they are in the book, they do include any updates and changes as warranted by errors that were found after publication. Thus, if you are having problems with a particular script, download the most current version here or check the errata section.
- The URLs as referenced in the book are not available for execution online.
- These scripts have been formatted with line breaks that will work on most systems running most text editors. If you have difficulty opening a script, try:
- adjusting the way your text editor treats text files
- using a different text editor, if possible
- posting a message to the online forum, asking for help
Complete Set of Scripts
modern_javascript_scripts.zip (236 KB, last modified 06/13/2012)








Hi Larry
You may not remember me, but I am a great fan of your books ‘php6 and MySQL5′ and ‘advanced php’.
I bought ‘Modern JavaScript Develop and Design’ as soon as it came out and think that it is great and am thoroughly enjoying reading it.
One error that I think you missed though:…
On page 210, shouldn’t:…
“my['car']['model'];
my['favouriteColors'][0]”
actually be:….
“me['car']['model'];
me['favouriteColors'][0]“?
Best regards
Max Kite
Larry, I am using JavaScript book to learn JavaScript. I know what HTML is and can deduce a lot.
But I am up against a wall on your page 106, item Number 9.
You say: The function must return a value of false….
However nothing goes wrong if I make it return true.
Could you elaborate on this. That return in javascript is critical. I have gotten as far as chapter 6 and can deduce a lot on html. But that statement in 9. is NOT self contained. Could you explain more
Hello Tom. If you’re having problems with this bit of code or explanation, please use the support forums where I’ll be happy to assist.
I really enjoy by reading this book, very professional
i hope make another book for JQuery with the same way of teaching
Thank you very much!
The NOTE on page 224 distinguishing parameters from arguments is excellent, but in many instances after
that in Chapter 7, parameter is used where argument should be used. My students would appreciate having this
cleaned up in a future printing.
Thanks!
modern javascript book is amazing . lerry sir can u tell me what does it mean when u say random number 0 inclusive and 1 exclusive i am a bit confused ?
Thanks for the nice words! It is appreciated. By inclusive and exclusive, I mean that the random number could include 0 but excludes 1. In other words, you could get 0 as a possible random number but you’ll never get 1.
great once again thanks larry .
Hi Larry,
I’m starting Uni this year and want to buy your book for the class I’m taking. I was wondering which would be better to buy – The eBook or the physical Textbook? I suppose it just depends on preference but, what do you think?
Thanks for your interest in the book. Which version you buy is entirely a matter of your preference, I would think.
Hi Larry, Great book! It’s better than the ones I’ve read in the past, but I noticed that page 137 has an error with logical operators, not sure if someone already addressed this to you.
The second paragraph on page 137, your book states that
var x = 5;
if ( ( 0 < x) && (x < 10) ) { // TRUE!
should be false. Actually that entire segment on the "or" ( || ) is wrong. I think it's just a typo.
cheers,
Ken
Thanks, Ken, for the nice words, and apologies for the confusion. That’s already on the errata page, by the way.