โ† Back to Courses
โšก JavaScript ๐ŸŒฑ Beginner โšก 55 XP โฑ 7 min โญ Premium

Adding Randomness: Surprise Moves

๐Ÿ“‹ Instructions

Predictable enemies are boring. Add RANDOMNESS so players can't guess every move!

Use Math.random() to make an enemy sometimes do something surprising.

๐Ÿ”’

The code editor and XP reward for this lesson are part of Premium.

Unlock Premium
๐Ÿ”’

This is a Premium Lesson

Subscribe to unlock the interactive code editor, run your own solutions, and earn XP for this lesson.

โญ Unlock Premium