Video Thumbnail

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

Premium Features

Download Video

Revisiting setInterval

Published 2 months 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

Cheat Sheet Preview

Download The Official Chris Courses HTML5 Canvas Cheat Sheet

Essential canvas syntax at your fingertips.

Download Now

Providing the lift to launch your development career

© 2022 Chris Courses. All rights reserved.