Need help on my fighting game

project

#1

I just use the first level to play my code out. I want to make it so that when it displays the enemy name associated with the wave.

//monsters
enemy1 = ["dragon"]
enemy2= ["snake"]
enemy3 =["slime"]

//variables
var wave = 1

var choice = prompt("an " + enemy(wave)[0] + " appears, what do you do? attack defend heal run").toLowerCase();

I want the code to read this line as, enemy(wave number)[0]. so if it's wave #1, it activates enemy1. if it's wave 2, it does enemy2, etc
sorry if this was a bad explanation.


#2

Wait till you progress further, then try making it with the other concepts you learn.
Also, dragons for wave 1? That's a bit unfair, ya know.


#3

the dragon was just an example, thanks for the help