Codecademy

Sign In Create Account
01/06
Introduction & Motivation

Computers are great at doing the same thing over and over. Whether the computer is doing the same task a certain number of times or performing a specific action on a long list of things, computers are definitely the right tool for the job.

Humans can do these sorts of repetitive tasks, but it's boring!

Now, use five console.log statements to print out the numbers from 1 to 5.

Boring and repetitive, right? Sounds like a job for a computer program!!

In the next exercise, you will use a loop to run a single console.log statement five times.

Stuck? Get a hint!Hint

Be sure to use one console.log statement once for each number from 1 to 5.

Save & Submit Code Reset Code
Back to editor

Start Here

Each lesson starts here. Read the explanation, then follow the instructions underneath. If you get stuck, you can click on the "Hint" for help.

Enter your Code

Type your response to the instructions here, in your code editor.

Submit!

Ready to see if your code does what it should? Click "Save + Submit" to run and check your code!

Click "Save + Submit" to run your code! Your code’s output will pop up on the screen.

See What it Does

This is the terminal. When you submit your code, it will run your code and display the result here.

Sign in to Codecademy