Brittle Morale

When the commander falls, the enemy shall retreat.


// You have one arrow. Make it count!

// This should return the enemy with the most health.
function findStrongestEnemy(enemies) {
    var strongest = null;
    var strongestHealth = 0;
    var enemyIndex = 0;
    // While enemyIndex is less than the length of enemies:
    while(enemyIndex < enemies.length){    
        // Set an enemy variable to enemies[enemyIndex]
        var enemy = enemies[enemyIndex];
        // Increment enemyIndex
        // If is greater than strongestHealth
        if( >strongestHealth){
            // Set `strongest` to enemy
            // Set strongestHealth to
            strongest = enemy;
            strongestHealth =;        
    return strongest;

var enemies = hero.findEnemies();
var leader = findStrongestEnemy(enemies);
if (leader) {
Points for
Needed items with
This site is in another language version