JavaScript is hot! What started as a quick-and-dirty language created for one of the first web browsers has turned into the world’s most popular programming language. Demand for JavaScript programmers is at an all-time high and only continues to grow.
This book is your key to becoming proficient in the core concepts of JavaScript. Whether your goal is to land a high-paying job as a programmer or to make your own personal website more interactive, you can be confident that the content and techniques presented in this book are fully up to date with the most current JavaScript standards and best practices.
Coupled with engaging and interactive online exercises, each chapter contains complete examples of real code that you can try and test in your own web browser at home.
Just as the only way to Carnegie Hall is to practice, practice, practice, the only way to become a better programmer is to code, code, code!
This book is a friendly and approachable guide to getting started with writing JavaScript code. As programming languages go, JavaScript is fairly easy to pick up and start using. Because it’s so accessible, many people who started as web page authors have found themselves in the position of being responsible for maintaining, modifying, and writing JavaScript code. If that describes you, this book will quickly and easily bring you up to speed.
Whether you know a little JavaScript or you’ve never seen it, this book shows you how to write JavaScript the right way.
Topics covered in this book include the following:
Learning JavaScript isn’t only about learning the syntax of the language. It’s also about accessing the tools and community that has been built around the language. Professional JavaScript programmers have greatly refined the tools and techniques used to write JavaScript over the language’s long and exciting history. Throughout the book, we mention important best practices and tools for testing, documenting, and writing better code faster!
To make this book easier to read, keep in mind the following:
document.write("Hi!");
document.getElementById("anElementInTheDocument").
addEventListener("click",doSomething,false);
We have a policy at our company, WatzThis?, to never assume (but, frankly, Eva is better at following the policy than Chris is). If you were ever 12 years old, you’ve probably heard the saying about what happens when you assume. If you don’t know, email us.
You don’t need to be a programming ninja or a hacker to understand programming. You don’t need to understand how the guts of your computer work. You don’t even need to know how to count in binary.
However, we do need to make a couple of assumptions about you. We assume that you can turn your computer on, that you know how to use a mouse and a keyboard, and that you have a working Internet connection and web browser. If you already know something about how to make web pages (it doesn’t take much!), you have a jump start on the material.
The other things you need to know to write and run JavaScript code are details we cover in this book. And the one thing you’ll find to be true is that programming requires attention to details.
Here’s a list of the icons we use in this book to flag text and information that’s especially noteworthy:
Here’s where you can find the online content for this book:
www.dummies.com/go/codingwithjavascript
to access the exercises at Codeacademy.www.dummies.com/go/codingwithjavascript
. Here you will find a directory labeled by chapter. Within the chapter, you will find each example labeled by its listing numberwww.dummies.com/cheatsheet/codingwithjavascript
.www.dummies.com/extras/codingwithjavascript
.www.dummies.com/extras/codingwithjavascript
.Coding with JavaScript is fun, and once you get a little knowledge under your belt, the world of interactive web applications is your oyster! So buckle up! We hope you enjoy the book and our occasional pearls of wisdom.