A Tiny Introduction to JavaScript with Exercises and Puzzles
A Tiny Introduction to JavaScript with Exercises and Puzzles
About the Book
Real coding for complete beginners.
Join Matthew MacDonald, author of too-many-tech-books-to-count, as he enters the world of JavaScript—accompanied by friendly ninjas, cheating goblins, and at least one rude wizard.
Develop your skills with 35 interactive exercises on CodePen. Best of all, there's no setup required (a web browser is all you need).
Who needs another book about coding for kids?
These days, you can’t turn around twice without someone trying to teach you how to code. So why the heck did I write my own book?
When my daughters started learning to code, I discovered that most tutorials were as dry as dust. If you wanted something more fun, you could play a coding game and write commands to move a character around a maze (like a princess, a zombie, a turtle, whatever). But unlike real programming, there was no chance to be creative. There was no freedom. There was no invitation to build your own programs.
I wanted something different. Something…
- Hands-on. If you want to learn a new skill, you need to practice. Otherwise, it’s just a bunch of theory swimming around in your head.
- Friendly for beginners. If you’re a beginner, it’s not enough to learn the basics of a programming language like JavaScript. You also need to learn the concepts of programming at the same time.
- No setup required. The world is full of amazing frameworks, tools, and code editors. But who wants to install a bunch of software before you even get started?
- Tiny. I’m a programming nerd, so I like talking about things like Big O notation. But no one needs to be buried in theory at the start of their journey. In this book, every chapter is a bite-sized lesson that you can usually finish in one sitting.
- Kinda fun. Not everyone has the motivation to learn from an old-fashioned textbook. But who doesn’t want to play dice with a cheating goblin?
So I decided to make something of my own. Then I unleashed it on my family.
This is the result of those experiments.
Why JavaScript?
Shouldn't this be in Python or something? Well, not necessarily...
JavaScript is a great first language for people learning to code. It’s not because JavaScript is a great teaching language (it mostly isn’t). It’s because JavaScript is everywhere—on every operating system, every browser, and almost every electronic device that’s more complicated than a toaster.
That means you can effortlessly share your JavaScript programs with friends. Unlike all the rest of computing history, there’s no downloading, installing, or configuring. And it doesn’t hurt that JavaScript syntax is similar to many other professional languages, like Java and C#. That means the effort you spend to learn JavaScript is never wasted.
Why CodePen?
CodePen is one of several free JavaScript playgrounds that you can use in your browser. With CodePen, you can write JavaScript code, test it, and save it for later, without needing to set anything up. And all the pieces of your solution—the HTML that creates the page, the CSS that makes it look good, and the JavaScript that powers it—are brought together in one place. There’s no need to juggle separate files.
A Tiny Introduction to JavaScript uses CodePen for all its exercises. Usually, you’ll start with a project that’s already built, and then change it. Maybe you’ll need to make an enhancement or fix a problem. And when you’re finished, you can show your work to other people just by sending them a link.
Can adults read this book?
Sure, we don't discriminate!
However, this book assumes you’re learning JavaScript and programming for the first time. If you already know a bit about programming, you’ll probably prefer a guide that focuses on the JavaScript language without re-introducing the concepts you already know.
Is this a coding game?
This is not a code simulation, game, code-themed activity, or coder cosplay. You're going to write tiny amounts of Real Code™.
This is an important difference. Games can be fun, and they can teach people, too. But to start developing a programmer's mindset, you need to write real code in an unbounded environment. Good luck!
Does it use modern JavaScript?
The focus of A Tiny Introduction to JavaScript is learning how to solve simple problems with code. There are plenty of neat tricks and practices we don't cover, because I'm focused on the basics. That said, I avoid embarrassing old JavaScript habits, like using the var keyword. This isn't your grandpa's JavaScript. (Not a slight to grandpas; they're awesome!)
Also available in print from Amazon.
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them