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
- Learn (10–15 minutes): Watch the keyboard demo for all six symbols, then type each one a few times.
- Practice (10–15 minutes): Type
5 > 3,2 != 4anda && bagain and again, checking each symbol as you go. - 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.
This week’s lessons
Do the lessons in order. Each one ends with a test, and your best result is saved.