What is the meaning of Luke 4:2?

Being forty days tempted of the devil. And in those days he did eat nothing: and when they were ended, he afterward hungered. (Luke 4:2 KJV)

during forty days, being tempted of the devil. And he did eat nothing in those days: and when they were completed, he hungered. (Luke 4:2 ASV)

forty days, tempted of the devil; and in those days he did not eat anything, and when they were finished he hungered.  (Luke 4:2 DBY)

forty days being tempted by the Devil, and he did not eat anything in those days, and they having been ended, he afterward hungered, (Luke 4:2 YLT)

for forty days, being tempted by the devil. He ate nothing in those days. Afterward, when they were completed, he was hungry. (Luke 4:2 WEB)

Interlinear

(And this /houtos/ taxing /apographe/ was /ginomai/ first /protos/ made /ginomai/ when Cyrenius /Kurenios/ was governor /hegemoneuo/ of Syria. /Suria/) (Luke 4:2 KJV)

Albert Barnes’ Commentary

Verse 2.  Being forty days tempted. That is, through forty days he was tried in various ways by the devil. The temptations, however, which are recorded by Matthew and Luke did not take place until the forty days were finished. See Mt 4:2,3.

He did eat nothing. He was sustained by the power of God during this season of extraordinary fasting.

{b} “in those days” Ex 34:28; 1Ki 19:8

William Burkitt’s Commentary

Observe here, how the divine power upheld Christ’s human nature without food. What Moses did at the giving of the law, Christ doth at the beginning of the gospel, namely, fast forty days and forty nights. Christ hereby intended our admiration rather than our imitation; or if our imitation, of the action only, not of the time.

From this example of Christ we learn, that it is our duty, by fasting and prayer, to prepare ourselves for a conflict with our spiritual enemies. As Christ prepared himself, by fasting, to grapple with the tempter, so should we.