I'm reading "Fundamental of Mathematical Statistics" by Gupta and Kapoor and the authors make the claim that "if $X$ is a random variable and $f$ is a continuous function, then $f(X)$ is a random variable". The proof has been skipped as it was beyond the scope of the textbook.
However, here's my question: There's not much information about given about $f$, so I assume $f$ is a real valued function on $\mathbb{R}$. So clearly the composition $f(X)$ is also a random variable. The hypothesis that $f$ is continuous is never used. So, does it mean that $f$ does not have be continuous? Or am I wrong somewhere?