Learn Enough JavaScript to Be Dangerous

Author: Michael Hartl
Publisher: Addison-Wesley
Date: June 2022
Pages: 304
ISBN: 978-0137843749
Print: 0137843747
Kindle: B09RDSVV7N
Audience: Would-be JavaScript developers
Rating: 2
Reviewer: Mike James
To be dangerous? Is this a good ambition?

I'm not in sympathy with the title of this book. It's not what you might think however. I really do approve of the "to be dangerous" part of the title. It is the "Enough" I have a problem with. What sort of aspiration is it to just learn "enough" and to be really dangerous you need to learn a lot more than "enough". Or is the title supposed to be taken as "enough to be incompetent and hence blow your own foot off".

Never mind the sentiment, we can write it off as a publicity angle trying to make a distinction between this book and all the other JavaScript books out there. It's meaning may be dubious, but it made me stop and read it - shame on me perhaps...

So was I happier when I got beyond the title? 

Not really.


At the start of Chapter 1 we are told:

"There are no programming prequisites for Learn Enough JavaScript to be Dangerous..."

Well this is only slightly true and very misleading. The first thing is that the book uses Linux and you are expected to be happy with the Linux command line. This might be a tall order for a beginner, although the author does point you to a  online tutorial in his "Learn Enough" series of online books and streaming video.

The book does include a "Hello World" example, but on page 7 we have

git init
git add -A
git commit -m "initialize repository"

Yes, before "Hello World" we have to use Git!!! I'm prepared to admit that many a modern programmer would be lost without Git or similar but making it something that has to be tackled before any programs have been written seems hard. Again GIT is covered in one of Hartl's ten Learn Enough online courses. 

Next rather than run the JavaScript program locally, the program is added to the repository and then GitHub pages. Repeatedly the message that you probably should have read the Learn Enough Git, HTML and CSS material before this one is made very clear. If the reader hasn't read the online books by the same author then this particular book isn't going to take you very far.

You may not have to have any programming knowledge before starting in on this book but you definitely need a lot of knowledge and competence in other largely unconnected things.

From here we move on to a chapter on strings and by the way we look at the flow of control. The chapter is heavy on detail and light on general principles. The approach is light-hearted and there are lots of photos with cute captions but they don't really add anything. If you can't understand the text, the extras don't help - they probably won't even make you smile.


After looking at strings we move on to arrays and then other native objects. Notice that the idea of an object hasn't really been made central to anything, but it is used repeatedly. In the chapter on other native objects we have regular expressions, which could very much wait till the reader has mastered some more fundamental ideas. This is not a gradual introduction to JavaScript.

Next we get to functions, the most important detail of which is that they are objects but this fact is ignored. Instead we have method chaining which is far from fundamental. Then on to functional programming - well we have just been introduced to functions, so why not. This isn't really about functional programming - it's about using map, filter and reduce and TDD (test driven development) although what that has to do with functional programming I'm not sure. 

Eventually we have reached objects. but they are covered in a brief and shallow few pages just before the book ends with a look at TTD and event handling, DOM manipulation, shell scripts and a big example.


This is a book that isn't for the beginner, unless that beginner is happy with a lot of technical things beyond JavaScript. If they are then my guess is that the presentation is going to be too slow, too slight and too incomplete. This book is overall heavy on detail and light on principles and ideas. You might be its ideal reader, but I doubt it will make you in the slightest bit dangerous.

For recommendations of JavaScript books suitable for beginners see JavaScript Beginners Book Choice in our Programmer's Bookshelf section.

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.


The AWK Programming Language, 2nd Ed

Author: Alfred V. Aho, Brian W. Kernighan and Peter J. Weinberger
Publisher: Addison-Wesley
Pages: 240
ISBN: 978-0138269722
Print: 0138269726
Kindle: B0CCJ1N4X3
Audience: Developers interested in Awk
Rating: 5
Reviewer: Kay Ewbank

The name Brian Kernighan among the authors of this updated classic raises  [ ... ]

Bare Metal C

Author: Steve Oualline
Publisher: No Starch Press
Date: August 2022
Pages: 304
ISBN: 978-1718501621
Print: 1718501625
Kindle: B08YJB9BCF
Audience: C programmers
Rating: 3
Reviewer: Harry Fairhead
Bare metal C sounds exciting and very basic. Time to find out how the machine really works.

More Reviews

Last Updated ( Wednesday, 05 June 2024 )