Functions Practice. Collect Pits
Task
Swipe to start coding
Solution
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function ninjaController(ninja) {
lootPit(ninja);
ninja.goRight();
ninja.goRight();
lootPit(ninja);
ninja.goRight();
ninja.goRight();
lootPit(ninja);
}
function lootPit(ninja) {
ninja.goDown();
ninja.pickSushi();
ninja.goUp();
}
Explore other courses in Catalog
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 3
ninja.js
99
1
2
3
4
5
6
7
8
9
10
11
12
function ninjaController(ninja) {
// Write your code below
}
function lootPit(ninja) {
// Write your code below
}
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat