Vanilla Javascript Animated Background

Why isn’t my code working?

Hi @codeofdreams, double check the syntax of the setTimeout call. Pay close attention to the parenthesis placement.

1 Like

Could you explain? i’m not sure I understand @robertgroves .

Examine the line of code shown below. It is invalid. If you fix it I believe the code will work the way you intend.

       setTimeout(() => {
         square.remove()
       }), 5000
1 Like

Haha! Got it! Thank you. It looks wonderful now!

1 Like