Week 3: Quotes and strings
JavaScript code typing course. 13 wpm, 90% accuracy.
In JavaScript a piece of text is called a string, and you wrap it in quotes, for example "hello". The quotes mark where the text starts and ends. If you open a quote and forget to close it, the rest of the line can break. This week you learn to type both quote types comfortably and to close every string you open.
What you will learn
This week introduces two symbols: " and '. On the US English layout:
"is Shift plus the apostrophe key. Press Shift with the opposite pinky and the apostrophe key with your right pinky.'is the apostrophe key on its own, pressed with your right pinky.
You will write lines such as console.log("hello") and console.log('hello'). Both work in JavaScript. Pick one style for a line and keep it consistent.
Technique tips
- As soon as you open a quote, close it too. Type both quotes first, then fill in the text between them.
- Press the apostrophe key with your right pinky and keep the rest of your hand still.
- The double quote needs Shift, so have your opposite pinky ready before you press the apostrophe key.
- Keep your eyes on the screen while typing the text inside the quotes. Let your fingers find the quote keys by feel.
- Check that both quotes are in place before you move on to the next character.
Lessons
- Learn (10–15 minutes): Watch the keyboard demo for the two quote symbols, then type each one a few times.
- Practice (10–15 minutes): Type
console.log("hello")andconsole.log('hello')again and again, checking that every string closes. - Review (10–15 minutes): Take the two-minute test and focus on closing every quote.
This week’s goal
Your targets are 13 WPM and 90% accuracy. Finishing the week earns one star. Reaching 90% accuracy earns two stars, and reaching the speed target as well earns three. Get every string closed correctly before you chase speed. One unclosed quote costs more time than a slow, careful line.
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.