201,733 views
2 votes
2 votes
Here is the API for a robot library.

// moves the robot forward
function moveForward();

// turns the robot to the left
function rotateLeft();

// turns the robot to the right
function rotateRight();

// checks if a robot can move in any direction
// direction {string} - the direction to be checked
// return {Boolean} - true if the robot can move in that direction, otherwise returns false
function canMove(direction);
Which code segment will guarantee that the robot makes it to the gray square without hitting a wall or a barrier (black square)?



A.
B.
C.
D.

User Neridaj
by
2.8k points

1 Answer

21 votes
21 votes

Answer:

hi

Step-by-step explanation:

User SomeGuyOnAComputer
by
3.2k points