The turtle has four functions.
// Move the turtle forward by the specified amount of pixels.
turtle.forward(amount);
// Returns the new position of the turtle.
// Turn the turtle by the specified amount of degrees.
// A negative number will turn the turtle left and a positive number will turn the turtle right.
turtle.turn(degrees);
// Put the turtle's pen down, making it draw a line when moved.
turtle.penDown();
// Put the turtle's pen up, making it not draw a line when moved.
turtle.penUp();
With these simple commands plus JavaScript's normal programming language control flow features, the potentials are endless.