Mission 41 / 52• Text Objects - Words

Words Review

Words are the atomic building blocks of coding. Mastering `diw`, `daw`, and `ciw` saves hours every week.

Word text objects summary

  • diwdelete word only
  • dawdelete word + whitespace
  • ciwchange entire word
1
const previousScore = 15;
2
const currentScore = previousScore + 5;

Use `ciw` to rename `previousScore` in both places.

Now it's your turn!

0 / 4 tasks complete0.0s / 22s par0 / 34 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Rename previousScore to currentScore with ciw. Return to normal mode.

Expected result
const currentScore = 15;
Show hint

Use ciw, type currentScore, then Escape.

1
const previousScore = 15;
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next