Old Testament religion was not limited to the men of Israel. The entire assembly included women and children.
the foreigners who lived among them: The Israelites included those who left Egypt with them during the exodus (Exodus 12:38, 48–49). These converts accepted the Lord as their God. They joined Israel after seeing the great things God had done for them.