Kindly clarify the meaning of the word "masjid" in the light of the following verse:-
22:40 Those who have been evicted from their homes unjustly, for no
reason other than saying, "Our Lord is God!" For, if God had not enabled
people to defend themselves against one another, monasteries,
churches, synagogues, and masjids, where the Name of God is oft
mentioned, would surely have been destroyed. And God will certainly
help those who help Him. God is Mighty, Powerful.
Here, masjid is mentioned as a place similar to monasteries, churches and synagogues. Does it not mean that Masjid is a place worship? (a place for collective prostration..?)
Thanks and regards.