For Joshua did not draw back the hand that held out his javelin until he had destroyed all who lived in Ai (Joshua 8:26 NIV).
This was crucial. Because they had been defeated in the previous battle against Ai. Then God had shown them the cause of defeat as sin in their midst. They then had the cause removed and destroyed from their midst.
Now they were given a fresh command to attack Ai. And God asked Joshua to hold out toward Ai the javelin that was in his hand. And he did so and did not draw back his hand until everyone in Ai was destroyed.
The lesson here is that we need to focus sharply. We might have been defeated in the past. Yet when the cause of that defeat is removed then the focus need to be straight ahead on achieving victory.
The next lesson is that the battle for victory should be one of relentless pursuit until it is totally achieved. The javelin that was held out toward Ai was not drawn back until a total victory was achieved.
Another important lesson here is that if someone, especially someone in a leadership position, takes such a bold visible stand against satanic forces, it will be a sign for others to make an attack for victory.
In other words, simply seeing someone stand up for God can encourage others to do the same and together achieve victory.
Finally, this great victory was a result of simple obedience. For God had commanded Joshua to stretch out toward Ai the javelin that was in his hands. He did not ask God the meaning of this act. He just obeyed. A single, decisive, simple act of obedience brought victory!