• Chapter 1: Introduction
    • 1.1 Introducing Karel
      • Programming in Karel
      • Karel's world
      • Karel's built-in functions
    • 1.2 Teaching Karel to solve problems
      • Getting Started
      • Defining Functions
      • Completing the program
      • Using library functions
      • Decomposition
    • 1.3 Control Statements
      • Conditional Statements
      • Iterative Statements
      • Solving General Problems
    • 1.4 Stepwise Refinement
      • An exercise in Stepwise Refinement
      • The principle of top-down design
      • Refining the first subproblem
      • Coding to the next level
      • Finishing up
    • 1.5 Algorithms in Karel's world
  • Chapter 2: Introducing JavaScript
    • 2.1 Data and types
    • 2.2 Numeric data
      • Representing Numbers in JavaScript
      • Arithmetic expressions
      • Precedence
    • 2.3 Variables
      • Declaring variables
      • Assignment
      • Increment and decrement operators
      • Naming conventions
      • Constants
      • Sequential calculations
    • 2.4 Functions
      • Implementing functions in JavaScript
      • Library function
    • 2.5 String data
      • String operations
      • Writing simple string functions
    • 2.6 Running JavaScript in the browser
      • The "Hello World" program
      • JavaScript and the Web
      • An HTML template for JavaScript programs
    • 2.7 Testing and debugging
      • Programming defensively
      • Becoming a good debugger
      • The phases of the programming process
      • An example of a psychological barrier
      • Writing effective test programs
    • 2.8 Software Maintenance
  • Chapter 3: Control Statements
    • 3.1 Boolean data
      • Relational operators
      • Logical operators
      • Short-circuit evaluation
    • 3.2 The if statement
      • Additional formats for the if statement
      • The ?: operator
    • 3.3 The switch statement
    • 3.4 The while statement
    • 3.5 The for statement
      • The relationship between for and while
      • Nested for statements
    • 3.6 Algorithmic programming
      • An early square-root algorithm
      • Finding the greatest common divisor
      • Euclid's algorithm
    • 3.7 Avoiding fuzzy standards of truth