Skip to content

1. Automate Tedious Tasks with Code

Playback Speed:

In this activity, you will add to your Auto Editor program so that it searches for and highlights at least seven different words.

To do this, you will use an array and a loop.

Then, you will customize the list of words to include ones you would like to find in your own writing.

Building this part of your program will make it possible for your Auto Editor to find many common problems in a document quickly and easily.

Learning code allows you to automate repetitive tasks.

Searching through a document for even a few overused words takes quite a while.

You might even miss a few.

The program you are creating will perform this task very fast and with no errors.

Plus, once you write a piece of code, you can re-use it over and over again.

The Auto Editor program you’re making in this unit, for example, will work on any piece of writing that is pasted into the document.

There are many time-consuming tasks that computers can automate.

For example, an online robot lawyer developed by a college freshman files appeals for parking and traffic tickets.

Users type their information into the bot, and it files the appeal for their ticket automatically.

Now, it’s your turn.

Open your Auto Editor document, and remove any highlighting.

Then, open the script editor, so you’re ready to add to your program!


  1. Open the document "Auto Editor."
  2. Remove highlighting from the document.
  3. Open the script editor.
  • "Cool JavaScript Code at Game Jam" by Iwan Gabovitch ( -- Licensed by CC BY 2.0 ( -- Image scaled up, cropping edges
  • "DoNotPay Homepage" by DoNotPay (
  • "Stanford student’s robot lawyer has beaten 160,000 parking tickets" by The Washington Times (