Yahweh said to Joshua, Don't be afraid because of them; for tomorrow at this time will I deliver them up all slain before Israel: you shall hamstring their horses, and burn their chariots with fire.
Therefore the success of Joshua was due to his prompt and faithful obedience to the things that God commanded.  "And Joshus did unto them as Jehovah bade him ...  (Joshua 11:9)."