Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Ninja Controls | Basic Controls
Ninja Game
course content

Course Content

Ninja Game

Ninja Game

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

book
Ninja Controls

In this chapter, you'll get more practice with controlling your ninja.

Recap of Ninja Methods

Here's a quick reminder of the methods you can use to control your ninja:

  • Movement Methods: goRight(), goLeft(), goUp() and goDown().

  • Sushi Methods:pickSushi() and putSushi().

Example

Here's an example of how you might use these methods to move your ninja and collect sushi:

js

ninja.js

copy
Task
test

Swipe to begin your solution

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
js

ninja.js

toggle bottom row

book
Ninja Controls

In this chapter, you'll get more practice with controlling your ninja.

Recap of Ninja Methods

Here's a quick reminder of the methods you can use to control your ninja:

  • Movement Methods: goRight(), goLeft(), goUp() and goDown().

  • Sushi Methods:pickSushi() and putSushi().

Example

Here's an example of how you might use these methods to move your ninja and collect sushi:

js

ninja.js

copy
Task
test

Swipe to begin your solution

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt