these species died off at the end of the jurassic , to be replaced by small dinosaurs that evolved into the iguana-like iguanodons , the dome -headed dinosaurs and the largest land-based predator ever to exist , tyrannosaurus rex -- all of which were wiped out at the end of the cretaceous period 65 million years ago .