Exodus 34:28
And he was there with the LORD forty days and forty nights; he did neither eat bread, nor drink water. And he wrote upon the tables the words of the covenant, the ten commandments. And he was there with the LORD forty days and forty nights; he did neither eat bread, nor drink water. And he wrote upon the tables the words of the covenant, the ten commandments.
After Israel's sin with the calf, Moses spent a second forty days and forty nights alone with the Lord on the mount in worship and intercession, with no other man permitted to go up. For the whole time he neither ate bread nor drank water, miraculously upheld as at the first. The tables he had hewn at God's command were written upon by the Lord himself with the words of the covenant, the ten commandments, while Moses was also commanded to write the covenant words and received direct instruction to teach Israel as a repository of truth for the world. That long communion caused his face to shine with the reflected glory of the divine presence, so that Aaron and the people in guilt were afraid to come near and he put a veil upon his face when returning to the camp. Unlike Christ, who in human nature hungered through forty days while facing Satan's fierce temptations in the wilderness, Moses was specially enshrouded by God's glory and felt no pangs of hunger nor the assault of a powerful tempter.
Time on the Mountain
Exodus 34 stands in the setting of worship and intercession for Israel after their sin, with the promise to renew favor to them and do great wonders on their behalf. It was a second forty days and forty nights alone in communion with God, with no man permitted to go up with him and none permitted to approach during his absence. For the whole forty days and nights there with the Lord he neither ate bread nor drank water, miraculously sustained as at the first.
On the mount he listened to God's words and received instruction directly from God to teach and give to Israel, an essential preparation of the highest value. That instruction taught that Israel was to be a repository of truth for the whole world. Covered so he could see and live, he was shown heavenly things as the ideal for the sanctuary. During that time he was shown the pattern for every bell, pomegranate, tassel, fringe, curtain, and vessel, with nothing to be made except according to that pattern, so that when he came down he was ready to direct the skilled workers.
At God's command he had prepared two tables of stone and taken them to the summit, and the Lord himself wrote upon the tables the words of the covenant, the ten commandments. God commanded Moses to write the covenant words, and the ten commandments were written upon the stone tables while he was with the Lord. That long communion caused his face to reflect the glory of the divine presence with dazzling, shining light, which he himself did not know. In conscious guilt Aaron, the rulers, and the people were afraid to come near, and in compassion for their fear he put a veil upon his face and continued to do so thereafter when returning to the camp from communion.
While he was on the mount listening to the words of God, Israel below made a golden calf and worshiped it. When he came down and found this he called for everyone on the Lord's side to take position with the Lord. Those who yielded were preserved alive while those who refused lost their lives, showing that the Lord tests His people.
Contrast with Christ's Fast
Moses went without food for forty days on special occasions when he was lifted and elevated above ordinary human weakness and above the human condition, specially sustained by God and surrounded, enshrouded, and enclosed by God's glory and excellent glory. Because he was so sustained and enclosed, he did not feel hunger and did not suffer its pangs during the forty days.
Nor was he facing a powerful tempter during that time, nor harassed and tormented by Satan and his fierce temptation as Christ was. By contrast, Christ in human nature, without the same visible sustaining glory, went forty days without food in the wilderness and endured hunger while facing Satan's temptations.