Table of Contents

Introduction

This book will not teach you everything there is to know about coding or JavaScript. It barely scratches the surface, and that is precisely the point.

Mastering the craft of coding is a career-long journey, but being able to start coding and develop a baseline understanding doesn't have to be hard. We feel that most guides out there tend to overload beginners with details that are distracting from what matters in the beginning.

This book was written to get you from "zero" (absolute beginner) to novice-level coder in the fastest way possible.

Sometimes we link to additional reading, but the core material is focused on being just enough to start building and experimenting.

A Brief Note on Formatting

Formatting code and diagrams to show up properly on Kindle devices is challenging to say the least.

When you're reading this book in front of your computer, you can get the best reading experience at firststepcoding.com/book

Guiding Philosophies & Strategic Shortcuts

Challenge-Based Learning

Reading this guide can help you build an understanding of code, but you're not going to fully "get it" without carefully working through the exercises.

Each section in this book aligns to coding exercises in a platform called Replit. You will need to join three separate Replit classrooms in order to complete the exercises:

Before you start your first exercise, watch the Replit walkthrough in this video. The part you need to watch is just exercise 0.1 demo which starts at around 30 minutes in and ends at 42 minutes.

Content for each section builds on knowledge you will have acquired by completing the exercises for the previous section. So, rather than trying to read through this whole guide at once, you should read each section and complete the exercise before moving forward.

Emphasis on Terminology

Learning the terminology is critical for a number of reasons:

We'll call out key terms in each section and link to a terminology table. We recommend studying them frequently, and practicing your command of these terms when you describe your code to others.

Avoiding Pitfalls

After teaching hundreds of students introductory coding, we've identified many common pitfalls. Following these guidelines will help you steer clear:

Here's Some Important Stuff We're Simplifying for You

In-browser code editor first

In real-life, coders most often use editors like VS Code, Atom, or Sublime to code directly from their computers. If you become a professional coder, you will eventually need to migrate to one of these tools.

When you're just starting out, managing your own development environment can be unnecessarily cumbersome, so we side-step this problem by starting you off with an excellent in-browser editor called Repl.it.

One tool for every job

We're not going to show 3 different ways to loop over an Array. We're going to show you the one way that is the best option 90% of the time anyway.

One equality operator

JavaScript comes with its share of weirdness, and we want to minimize the time you are distracted by it when you're just getting started. We will never use the == operator in this course, and we actually don't use it in "real-life" either. Stick to === and your coding life will be that much simpler.

No end-of-line semicolons

For large projects, we think they make sense to use. But 99% of the time they are unnecessary with modern JavaScript, so we typically won't burden you with this "syntactic noise" of end-of-line semicolons except in cases where they are necessary.

No let, const, or arrow functions

ES6 JavaScript provides many new syntax options we love, but we'll stick to "classic" JavaScript in this guide. We encourage you to learn ES6 on your own once you're comfortable with the classic syntax.

Single quote strings

For consistency, we'll strive to use 'single quote strings' everywhere instead of "double quote strings"

JQuery for DOM manipulation and HTTP requests

JQuery is not as necessary as it once was due to improvements to "Vanilla JavaScript" and browser support. We've still opted to teach a few concepts through JQuery first because it still does a nice job of simplifying DOM manipulation and HTTP requests (these require understanding Promises if you use fetch ) — two topics that are conceptually challenging enough for a beginner. We do recommend learning how to work without JQuery after you are comfortable with these concepts, and we have included an appendix section to help you make the transition.

External Resources

At a number of points in this book, we will direct you to external resources for learning. We do this in situations where we feel that another resource already does an excellent job at concisely teaching you that topic.

Next Chapter - I/O, Variables, Types, & Conditional Logic