Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Revisiting setInterval

Published 2 years ago

Our current usage of setInterval is great for spawning enemies and power-ups, but there are some drawbacks that we need to address. Since setInterval functions still call themselves when switching to another tab, we need a way to clear these intervals, then restart them when navigating away from our game. We'll learn how to do exactly that, right here.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.