Workshop › Space Invaders-style › Step 6 of 21
Every frame each bullet rises 8 pixels; bullets gone off the top are dropped. They are drawn white.
```js
for (const bullet of bullets) bullet.y -= BULLET_SPEED
bullets = bullets.filter((bullet) => bullet.y + bullet.h > 0)
ctx.fillStyle = '#f8fafc'
for (const bullet of bullets) ctx.fillRect(bullet.x, bullet.y, bullet.w, bullet.h)
```y -= 8 moves up (y grows downward).filter keeps only bullets whose bottom (y + h) is still below the top of the screen.update, move and filter the bullets.draw, draw them.Skills: Velocity and gravity