1. The post assigned to Joshua, of whom this is the first mention: he is nominated commander-in-chief in this expedition, that he might be trained up to the services he was designed for after the death of Moses, and be a man of war from his youth. He is ordered to draw out a detachment of choice men from the thousands of Israel and to drive back the Amalekites, v. 9. When the Egyptians pursued them Israel must stand still and see what God would do; but now it was required that they should bestir themselves. Note, God is to be trusted in the use of means.