Hello, I do not get what to do to get the last word in this level
// Ogres are hiding in woods. Protect the peasants.
// The last word in the peasants' messages are a hint.
for (var x = 8; x <= 72; x += 16) {
hero.moveXY(x, 22);
// Peasants know whom to summon.
var peasant = hero.findNearest(hero.findFriends());
var message = peasant.message;
if (message) {
// Words are separated by whitespaces.
var words = message.split(" ");
// "words" is an array of words from the "message".
// Get the last word. It's the required unit type.
// Summon the required unit type.
}
}