Coding Intro: Conditions and Loops - Typing Practice Lesson
if, for and while, comparisons and HTML tags
Building Fluency
Focus Keys:
Code
<
>
Next: capital P, right pinky, left Shift
0
WPM
100%
Accuracy
0
Errors
0%
Progress
Programs make decisions with if statements. In JavaScript: if (score >= 90) { grade = "A"; } else if (score >= 80) { grade = "B"; } else { grade = "C"; } The comparison operators are < (less than), > (greater than), <= (at most), >= (at least), === (equal to) and !== (not equal to). Note that === compares two values, while a single = stores a value. A condition is either true or false, so temp > 30 is true when temp is 35.
Quick start
- Click the text area above.
- Type the shown text. Prioritize accuracy.
- Use Backspace to correct mistakes.
Tip: Operators
Operators like >= and === are two or three keys in a row. Type them as one quick group, not one key at a time.