There are many interesting 40 day experiences in the Bible. Moses was on the mount with God for forty days. The spies searched the land of Canaan forty days. Goliath challenged Israel for forty days. Elijah at angels' food that provided him with strength for forty days. Jonah's prophecy of judgement gave Nineveh forty days.
There are two forty day experiences in the life of our Lord.
Mark 1:13 And he (Jesus) was there in the wilderness forty days, tempted of Satan; and was with the wild beasts; and the angels ministered unto him.
The first forty day experience is seen at the beginning of Jesus's ministry, following His baptism. It was a period of temptation and testing that ended in triumph over Satan.
Acts 1:3 To whom also he (Jesus) shewed himself alive after his passion by many infallible proofs, being seen of them forty days, and speaking of the things pertaining to the kingdom of God:
The second forty day experience is seen at the end of Jesus's earthly ministry -- it followed the greatest triumph of all. Jesus died on the cross for sins, finishing redemption and dismissing His spirit. He lay in the grave three days and three nights, then rose triumphant over death and the grave. After His resurrection Jesus was seen for forty days before ascending back into heaven. It was a period of confirmation of His triumph, giving notice that He was alive. It was a period that provided historical witnesses to this historical truth, as well as comfort to the disciples and upbuilding of their faith.
The forty days are sorts of bookends at the beginning and end of Jesus's earthly ministry. ¡Like some languages other than English, they provide exclamation marks of triumph on the mighty work of our Lord and Saviour Jesus Christ!