Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Align two columns | Challenges
JavaScript Ninja
course content

Contenuti del Corso

JavaScript Ninja

JavaScript Ninja

1. Basic Controls
2. Advanced Controls
3. Functions
4. Loops
5. If-Else Statements
6. Challenges
7. Array

book
Challenge: Align two columns

Welcome to the "Align Two Columns" challenge!

Let's recap the ninja methods and features you've learned:

Ninja Methods:

  • goRight(), goLeft(), goUp(), goDown(): Move the ninja one cell in the specified direction.
  • pickSushi(): Pick up sushi from the map and add it to your inventory.
  • putSushi(): Place sushi from your inventory onto a cell.
  • objectUp(), objectDown(), objectRight(), objectLeft(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Compito

Swipe to start coding

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 6. Capitolo 4
js

ninja.js

toggle bottom row

book
Challenge: Align two columns

Welcome to the "Align Two Columns" challenge!

Let's recap the ninja methods and features you've learned:

Ninja Methods:

  • goRight(), goLeft(), goUp(), goDown(): Move the ninja one cell in the specified direction.
  • pickSushi(): Pick up sushi from the map and add it to your inventory.
  • putSushi(): Place sushi from your inventory onto a cell.
  • objectUp(), objectDown(), objectRight(), objectLeft(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Compito

Swipe to start coding

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 6. Capitolo 4
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt