Surah Al-Hijr — Ayah 24 (15:24)
وَلَقَدۡ عَلِمۡنَا ٱلۡمُسۡتَقۡدِمِينَ مِنكُمۡ وَلَقَدۡ عَلِمۡنَا ٱلۡمُسۡتَـٔۡخِرِينَ ٢٤
English translation (Saheeh International)
And We have already known the preceding [generations] among you, and We have already known the later [ones to come].
Brief commentary
I know of who was born and died before you, and of those who will be born and die after. Nothing of that is hidden from Me.