Attack enemies in an array - JAVASCRIPT OR ANY

Hello, does anyone know what I’m doing wrong? Could someone please help me please :frowning:


var enemies = hero.findEnemies();
var enemyIndex = 0;
while (enemyIndex < enemies.length) {
    hero.say("HAY ENEMIGOS CERCA");
    var enemy = enemies[enemyIndex];
    if (enemy) {
    enemyIndex += 1;

something that might help is deleting the “hero.say” statement because it’ll slow you down a lot