That is the most braindead definition Ive ever heard. Did anybody really print a book containing such nonsense?
I think that the kid was misstating what he read. The domain does consist of x values and the range does consist of y values, just not necessarily all of them.
f : ℜ → ℜ t ↦ t2It’s not like variables being called x or y was an essential part of the definition of a function.