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

Contenido del 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.

Tarea
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.

Solución

Starter Map

Goal Map

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 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.

Tarea
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.

Solución

Starter Map

Goal Map

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 2
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt