- Brief Table of Contents (Not Yet Final)
- 1. A Quick Dip into Javascript: Getting your Feet Wet
- The way JavaScript works
- How you’re going to write JavaScript
- How to get JavaScript into your page
- A little test drive
- JavaScript, you’ve come a long way...
- How to make a statement
- Variables and values
- Constants, another kind of variable
- Back away from that keyboard!
- Express yourself
- Doing things more than once
- How the while loop works
- Making decisions with JavaScript
- And, when you need to make LOTS of decisions
- Reach out and communicate with your user
- Create an alert
- Write directly into your document
- Use the console
- Directly manipulate your document
- A closer look at console.log
- Opening the console
- Coding a Serious JavaScript Application
- How do I add code to my page? (let me count the ways)
- We’re going to have to separate you two
- JavaScript cross
- JavaScript cross Solution
- 2. Writing Real Code: Going Further
- Let’s build a Battleship game
- Our first attempt...
- ... a simplified Battleship
- First, a high-level design
- A few more details...
- Representing the ships
- Getting user input
- Displaying the results
- Working through the Pseudocode
- Oh, before we go any further, don’t forget the HTML!
- Writing the Simple Battleship code
- Now let’s write the game logic
- Step One: setting up the loop, getting some input
- How prompt works
- Checking the user’s guess
- So, do we have a hit?
- Adding the hit detection code
- Hey, you sank my battleship!
- Provide some post-game analysis
- And that completes the logic!
- Doing a little Qualit y Assurance
- Can we talk about your verbosit y...
- Finishing the Simple Battleship game
- How to assign random locations
- The recipe for generating a random number
- Back to do a little more QA
- Congrats on your first true JavaScript program, and a short word about reusing code
- JavaScript cross
- JavaScript cross Solution
- About the Authors