How it Works: Drawing the Trajectory

In this lesson, we will understand the implementation of the previous exercise. Let's begin!

We'll cover the following

How it works

The trajectory variable, var trajectory = [];, you added in step 1, represents an empty array.

In step 2, you saved the current ball position with the following code:

Get hands-on with 1200+ tech skills courses.