What was Yehoshua doing on Har Sinai?
Ramban: He was one of the seventy elders who accompanied Moshe part of the way out of the camp. 3 Now that Moshe left them to ascend the mountain, Yehoshua accompanied him up to the border.
Since that was as far as he was allowed to go (Rashi).
And we see from the Pasuk in Ki Sisa, Sh'mos 32:17 that he was not with the people when Moshe returned (Rashi).
Why does the Torah inform us three times that Moshe ascended the mountain?