We can have values repeat in the range of a function, but not in the domain. A function always has exactly one value in the range associated with a given value in the domain, but it can have multiple values in the domain associated with the same value in the range.
For example, in the equation y = x², we could say that y is a function of x (every y value except 0 has exactly 2 x values associated with it), but the equation y² = x would not describe y as a function of x (every x value except 0 would now have exactly 2 y values associated).