Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
For Loops Practice | Loops
Ninja Game
course content

Conteúdo do Curso

Ninja Game

Ninja Game

1. Basic Controls
2. Functions
3. Loops
4. If-Else Statements
5. Challenges

book
For Loops Practice

In this chapter, you'll have the opportunity to apply your knowledge of for loops by tackling a practical task in the Ninja Game. This exercise will help reinforce your understanding of loops and how they can be used to efficiently perform repetitive tasks.

Tarefa
test

Swipe to show code editor

Goal: Move a column of sushi.

To achieve this, you will need to use for loops to iterate over the grid and move the sushi. You are provided with a function goDownN(ninja, n) that moves the ninja down by n cells. You can use this function to help complete the task.

Solução

Starter Map

Goal Map

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
js

ninja.js

html

index.html

js

preset.js

toggle bottom row

book
For Loops Practice

In this chapter, you'll have the opportunity to apply your knowledge of for loops by tackling a practical task in the Ninja Game. This exercise will help reinforce your understanding of loops and how they can be used to efficiently perform repetitive tasks.

Tarefa
test

Swipe to show code editor

Goal: Move a column of sushi.

To achieve this, you will need to use for loops to iterate over the grid and move the sushi. You are provided with a function goDownN(ninja, n) that moves the ninja down by n cells. You can use this function to help complete the task.

Solução

Starter Map

Goal Map

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt