Closed lawrencesalinas closed 3 years ago
Ok, some of your code needs to be addressed, and then we can get to the issue at hand. First and foremost, we are NOT using var
to define variables, we are using let
for variables that can be reassigned values, and const
for variables that cannot be reassigned.
Ok, on to the issue at hand, you are creating circles, and then pushing them into an array of circles, but you're not utilizing that array, which is necessary to add these circles to the canvas and display their movement. What do you think you can do with that array in order to show all of the circles in the array on the canvas?
Understood. I am trying to use that created array in a function that will make it show the circles. I will post updates.
I was able to make multiple circles at will at any point of time using the array . Issues is close.
What's the problem you're trying to solve?
shoot circles everytime I press space bar. creating new circles and fire them at will.
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
I wa trying to create for loops to create multiple circles. everytime I press the button to fire, the circle comes back to the origin point
What is your best guess as to the source of the problem?
I only have one circle
What things have you already tried to solve the problem?
tried to create an array of ciicle object witht the same properties using a for loop