Week 14: Small programs I

JavaScript code typing course. 23 wpm, 94% accuracy.

This week you combine the pieces you have practiced into your first small programs. A program might store a value in a variable, repeat a loop, and check each result with a condition. Such programs have several lines, and most lines contain more than one symbol. Accuracy matters more than speed at this stage, so practice reading each line before you type it.

What you will learn

This week introduces no new symbols. You use the parentheses, quotes, operators, comparison signs and braces from earlier weeks together. When a symbol slows you down, review its key position on the US English layout from the earlier lessons.

No new keywords appear this week. The words let, if, else, for and function appear together in one program. A tiny example: for (let i = 0; i < 3; i++) repeats the block below it three times.

Technique tips

  • Type the program one line at a time, and check each line before you move on.
  • When you open a brace, think about its closing partner before you write the lines inside.
  • The Enter key fills in the next line’s indentation automatically, so check that the indentation is right before you add any spaces.
  • Declare each variable before the loop that changes it, so every line has what it needs.
  • Keep long lines manageable by typing them in parts, and keep your eyes on the screen.

Lessons

  1. Learn (10–15 minutes): Watch the keyboard demo for the program’s first part, then type the parts one at a time.
  2. Practice (10–15 minutes): Type the whole small program from start to finish three times, aiming for fewer mistakes each time.
  3. Review (10–15 minutes): Take the two-minute test and focus on one section of the program.

This week’s goal

Your targets are 23 WPM and 94% accuracy. Finishing the week earns one star. Reaching 94% accuracy earns two stars, and reaching the speed target as well earns three. One missing parenthesis can stop a whole program, so keep accuracy high and let speed follow.

This week’s lessons

Do the lessons in order. Each one ends with a test, and your best result is saved.

  1. Lesson 1: Learn

    Keywords

    12 minutes

    Start
  2. Lesson 2: Practice

    Practice

    12 minutes

    Start
  3. Lesson 3: Review and test

    Review and test

    13 minutes

    Start

All weeks