JavaScript Resources

Decision Making in JavaScript

What if you want to execute a statement or a set of statements only when a user has hit your web page with a certain web browser? Or, if a user has forgotten to fill in a text field in your form? Or, when any sort of specific condition or criteria are met?

Fortunately, JavaScript provides ways to choose when and where to execute commands. This ability to respond to specific conditions is known as decision making, and is a basic feature of any programming language.

If you are new to programming, there are a few key concepts to understand about decision making, before you can jump-in and start coding. The next few pages break it down into digestible chunks.

First up ... Conditional Statements.