The Israeli people served/worshiped Yahweh as long as Joshua was alive. After Joshua died, they continued serving/worshiping Yahweh while the elders who had experienced everything that Yahweh had done for the Israeli people were still alive.