Passage
If you forsake Yahweh and serve foreign gods, then He will turn and do you harm and consume you after He has done good to you.”
If you forsake Yahweh and serve foreign gods, then He will turn and do you harm and consume you after He has done good to you.”
Joshua 24:18 And Yahweh drove out from before us all the peoples, even the Amorites who lived in the land. We also will serve Yahweh, for He is our God.”
Joshua 24:19 Then Joshua said to the people, “You will not be able to serve Yahweh, for He is a holy God. He is a jealous God; He will not forgive your transgression or your sins.
Joshua 24:20 If you forsake Yahweh and serve foreign gods, then He will turn and do you harm and consume you after He has done good to you.”
Joshua 24:21 And the people said to Joshua, “No, but we will serve Yahweh.”
Joshua 24:22 And Joshua said to the people, “You are witnesses against yourselves that you have chosen for yourselves Yahweh, to serve Him.” And they said, “We are witnesses.”
The verse centers on "forsake", "yahweh", "serve", "foreign", "gods", "turn", "harm", and "consume". It is saying that the verse draws attention to "forsake" and "yahweh", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 19's "Then Joshua said to the people You..." into verse 21's "And the people said to Joshua No...", so "forsake" and "yahweh" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "forsake" and "yahweh" with trust shaped by these words, not by a vague optimism outside the passage.