# Where does the inequality: $|f(x)-f(y)|\leq|f(x)-f_n(x)|+|f_n(x)-f_n(y)|+|f_n(y)-f(y)|$ come from?

I've seen the inequality

$$|f(x)-f(y)|\leq|f(x)-f_n(x)|+|f_n(x)-f_n(y)|+|f_n(y)-f(y)|$$

used many times to prove that if a sequence of continuous functions converges uniformly to $f$, then $f$ is continuous, but I never understood where it came from.

Could someone enlighten me?

\begin{align} |f(x)-f(y)| &= |f(x)-f_n(x)+f_n(x)-f_n(y)+f_n(y) - f(y)| \\ &\leq |f(x)-f_n(x)|+|f_n(x)-f_n(y)|+|f_n(y)-f(y)| \end{align} using the triangle inequality.