Week 5: Comparison and logic

JavaScript code typing course. 14 wpm, 91% accuracy.

Programs make decisions by comparing values. You ask whether one number is bigger than another, or whether two values are equal. JavaScript uses <, >, !, =, & and | for this, and it combines conditions with && for “and” and || for “or”. This week you learn each of these symbols on the US English layout and practice typing them in short comparisons.

What you will learn

This week introduces six symbols on the US English layout:

  • < is Shift plus the comma key. Press Shift with the opposite pinky and the comma key with your right middle finger.
  • > is Shift plus the period key. Press Shift with the opposite pinky and the period key with your right ring finger.
  • ! is Shift plus the 1 key. Press Shift with the opposite pinky and the 1 key with your left pinky.
  • = is the equals key, pressed with your right pinky.
  • & is Shift plus the 7 key. Press Shift with the opposite pinky and the 7 key with your right index finger.
  • | is Shift plus the backslash key. Press Shift with the opposite pinky and the backslash key with your right pinky.

Practice with short comparisons such as 5 > 3, which is true, and 2 != 4, which means “not equal”. Type && and || as two identical symbols in a row.

Technique tips

  • Press < and > slowly the first few times. They sit next to each other, so check which one you need before you type.
  • Type && and || as two identical symbols in a row, without a pause between them.
  • Hold Shift until the symbol key is pressed, then release both together.
  • Keep your wrist steady when you type | on the right side of the keyboard.
  • Read the whole comparison aloud once before typing, so the logic is clear before your fingers move.

Lessons

  1. Learn (10–15 minutes): Watch the keyboard demo for all six symbols, then type each one a few times.
  2. Practice (10–15 minutes): Type 5 > 3, 2 != 4 and a && b again and again, checking each symbol as you go.
  3. Review (10–15 minutes): Take the two-minute test and focus on the symbols you mistyped most.

This week’s goal

Your targets are 14 WPM and 91% accuracy. Finishing the week earns one star. Reaching 91% accuracy earns two stars, and reaching the speed target as well earns three. One wrong comparison can flip the meaning of a whole condition, so accuracy comes first.

Symbols this week

The colored keys are the ones you learn this week. The color shows which finger presses the key.

` ~ 1 ! 2 @ 3 # 4 $ 5 % 6 ^ 7 & 8 * 9 ( 0 ) - _ = + Backspace Tab Q W E R T Y U I O P [ { ] } \ | Caps A S D F G H J K L ; : ' " Enter Shift Z X C V B N M , < . > / ? Shift Ctrl Win Alt Alt Gr Win Menu Ctrl

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

    New symbols: < > ! = & |

    12 minutes

    Start
  2. Lesson 2: Practice

    Practice

    12 minutes

    Start
  3. Lesson 3: Review and test

    Review and test

    12 minutes

    Start

All weeks