// 9. There's been a mixup in the battle plans and our goblin formation is made of orcs, // and our orcs formation is made out of goblins. We need to fix this mixup and also // make sure we send the goblins to battle first. // Tip: Try using y and p and see what happens
// start here // / // / // v /orcs<ENTER>yiwkviwpjviwpnviwp => oh no! It's orcs, that's the problem I was trying to illustrate! :) classOrc{} classGoblin{} const goblins = [new Orc(), new Orc(), new Orc()]; const orcs = [new Goblin(), new Goblin(), new Goblin()]; // We'd like to send the goblins first to battle, because they're cannon fodder // that will tire the enemy before the real warriors arrive. sendArmiesToBattle(orcs);
1 2 3 4
1. (at the start) => unnamed register: empty 2. `yiw` over orcs => unnamed register: orcs 3. `viwp` over goblins => unnamed register: goblins AAaah?! 4. `viwp` over orcs => unnamed register: orcs