Introduction

Welcome to A Practical Introduction to JavaScript. Thanks for reading. In order to help you get the most out of this book, it is useful to consider exactly what this book does and what it does not do.

This book aims to teach fundamental concepts of programming using JavaScript. It assumes no background with programming languages. The goal of the book is to help novice developers learn about assembling basic programs using common approaches. It uses modern approaches to writing code, but it does not assume a familiarity with the evolution of software development that has led us to this place.

This book is not a book written for experienced developers who wish to add another language to their repertoire. It does not push the boundaries of thinking about algorithms or demonstrate the flashiest solutions to problems. If you are looking for a quick read about the latest changes in JavaScript, then this probably isn't the book for you.

This book recognizes that programming, in general, and JavaScript, specifically, are both things that happen everywhere in our digital world: as more and more devices contain computing hardware, that hardware is always running software. Software is always powered by some form of programming.

This book also privileges programming for the Web, since that is the origin of JavaScript and still the primary place where JavaScript is used. Much of the discussion and examples will lean on Web-based scenarios and use cases.

How to Use This Book

This book is written with the goal of helping novice developers learn to program. In order to accomplish that goal, there are several repeating patterns that are designed to help everyone get the most from the book. Here is how you can use those patterns to get the most out of this book experience.

Read

Being a book, this involves a lot of reading. Each section contains several sub-sections. Some of those pages also contain media, code examples, and more. It's important to read through each section in detail, but it's often best to begin by reviewing the structure and skimming the content of a section as you first encounter it. Note the names of the sub-sections in the sidebar navigation, and click through all of the pages to get an idea of what kind of material is on each page. You might feel more like looking at the pictures, or looking for new things in the code examples, than reading the text, and that's OK. Reviewing questions in the Quiz for each section of the book is also a great way to start reading the section because it will help you identify and focus on the most important details.

Exercise

Most of the sub-sections throughout this book contain interactive code exercises. These are only available in the web version of the book, but you are strongly encouraged to visit the book online and work through these exercises. These are a great way to firm up your understanding of different concepts, and you can always click the "solution" button to see how the code should go.

You are also encouraged to copy and paste the code from the code samples into a JavaScript console to see how they work. The code examples have all been written in a way to make it as easy as possible to copy and paste them into a JavaScript console and run them there. This is a great way to experiment and test concepts.

(Note: Due to JavaScript sandbox restrictions, you cannot normally access the full context of a JavaScript environment in the book exercises, which is another reason why using your own JS console is a great idea for practice.)

Check Yourself

Each section of the book contains a Quiz. These quizzes are designed to allow you to check your understanding and to underscore the most important details covered in each section. You can attempt each quiz as often as you would like, and you can get an explanation for each answer. As mentioned above, reviewing the quizzes before reading each section is a great way to focus on the main details of each section.

Practice Some More

Each section contains an Extra Practice page, which presents you with code examples and asks you questions about each example. You are encouraged to attempt to figure out the answers interpreting the code in your head, but each example has also been written so that it will run if copy/pasted into a JavaScript console. You are encouraged to dig into these practice problems to strengthen your understanding of core concepts and see more examples of how the code looks.

Acknowledgements

Thanks to Jiun Ting Wang, who designed the cover for this book. Thanks to all of the students who have worked through this book, caught errors or tyops, and helped me become a better teacher.

results matching ""

    No results matching ""