Exodus 34:28
27 The Lord said to Moses, “Write down these words, for in accordance with these words I have made a covenant with you and with Israel.” 28 So he was there with the Lord 40 days and 40 nights; he did not eat bread, and he did not drink water. He wrote on the tablets the words of the covenant, the Ten Commandments. 29 Now when Moses came down from Mount Sinai with the two tablets of the testimony in his hand—when he came down from the mountain, Moses did not know that the skin of his face shone while he talked with him. 30 When Aaron and all the Israelites saw Moses, the skin of his face shone, and they were afraid to approach him.
Matthew 4:2
1 Then Jesus was led by the Spirit into the wilderness to be tempted by the devil. 2 After he fasted 40 days and 40 nights he was famished. 3 The tempter came and said to him, “If you are the Son of God, command these stones to become bread.” 4 But he answered, “It is written, ‘Man does not live by bread alone, but by every word that comes from the mouth of God.’” 5 Then the devil took him to the holy city, had him stand on the highest point of the temple,
Notes and References
"... Jesus is led by the Spirit into the wilderness where “he fasted for forty days and forty nights.” The motif of fasting and the explicit phrase “forty days and forty nights” - both Matthean editorial adaptations of Mark’s understated temptation story - clearly link Jesus to Moses, who also spent forty days and forty nights fasting in the presence of God on Mount Sinai (Exodus 34:28; Deuteronomy 9:9). Matthew does not tell us explicitly what Jesus was doing, besides fasting, during this forty-day period, but the strong allusion to the story of Moses suggests that perhaps he was interceding for Israel’s sins, just as Moses did: “Throughout the forty days and forty nights that I lay prostrate before the LORD when the LORD intended to destroy you, I prayed to the LORD and said, ‘Lord GOD, do not destroy the people who are your very own possession, whom you redeemed in your greatness, whom you brought out of Egypt with a mighty hand’” (Deuteronomy 9:25-26). If this inference is correct, then Matthew’s allusion to the story of Moses would lead us to envision Jesus in the wilderness identifying with the people’s plight and speaking to God on their behalf, as Moses did ..."
Hays, Richard B. Echoes of Scripture in the Gospels (p. 148) Baylor University Press, 2017