they denied their messengers. "So travel through the earth and see how was the end of those who denied," meaning: their end was that Allah destroyed them, then consigned them to the Fire; He warns them by that.
كذبُوا رسلهم ﴿فَسِيرُوا فِي الأَرْضِ فَانْظُرُوا كَيْفَ كَانَ عَاقِبَةُ الْمُكَذِّبِينَ﴾ أَي: كَانَ عاقبتهم أَن دمر الله عَلَيْهِم، ثمَّ صيرهم إِلَى النَّار؛ يُحَذرهُمْ بذلك