When Joshua challenges him with, "Friend or foe?" why does the Commander answer, "Neither"? Isn't he for the cause of Israel's army? No. Israel's army must be enlisted in his cause. He is the Commander, not they. When things are difficult we wonder, "Is God on my side?" Wrong question. The more appropriate question is, "Am I on God's side?"
During the encounter, after the Commander informed Joshua who He was, Joshua knew he was in the presence of the Holy, As a result, he fell prostrate on his face before the Commander. After this encounter, Joshua was strengthened to complete the task set before him. He knew that God was fighting for and with him. He was not carrying this battle on his own.