Workshop › Asteroids › Step 33 of 41
When the last rock is gone, the next wave begins, with one more rock.
```js
if (asteroids.length === 0) {
wave += 1
spawnWave()
}
```asteroids.length === 0 means no rocks are left.In update, under the crash block, leave an empty line and write the wave check.
Skills: Game states
← Waves of rocks Faster every wave →