Let $(X,d)$ be a metric space and suppose $(f_n)$ is a bounded sequence of functions from $X$ to $\mathbb{R}$ (here bounded means there exist a real number $M$ such that $|f_n(x)|\leq M$ for all $x\in X$ and $n\in\mathbb{N}$). Suppose that $f_n\to f$ uniformly. Prove that $f$ is bounded.
I tried using two different approaches:
Using the triangle inqeuality (while skipping some details): $|f_n(x)-f(x)|<\epsilon$ and $f_n(x)-f(x)|\leq|f_n(x)|+|f(x)|\leq M+?$ then I'm not sure how to show that $|f(x)|$ is bounded.
Suppose the contrary that $f$ is unbounded. Then there is an $x'\in X$ such that $f_n(x')\nrightarrow f(x')$ as $n\to\infty$ and it is a contradiction. But I'm not sure whether my working is correct? And I'm not sure how to write it more properly?
Thanks for the help!
Note that
$$ \lvert f(x) \rvert \leq \lvert f(x)-f_N(x) \rvert + \lvert f_N(x) \rvert < 1+M $$ where $N$ is so large that $\lvert f(x)-f_N(x) \rvert < 1$ for all $x \in X$.