Joshua did as Moses had instructed him and fought against the Amalekites, while Moses, Aaron, and Hur went up to the top of the hill.
Jewish Publication Society of America Version (JPS1917) - Exodus 17:10 >So Joshua did as Moses had said to him, and fought with Amalek; and Moses, Aaron, and Hur went up to the top of the hill.