for every convergent sequence $x_n$, $f(x_n)$ also converges. Does this imply continuity of f?

Suppose that $f$ is discontinuous at some point $x$. Then,for some $\varepsilon>0$, if $n\in\mathbb N$, then there is a $x_n\in B\left(x,\frac1n\right)$ such that $d\bigl(f(x),f(x_n)\bigr)\geqslant\varepsilon$. Now consider the sequence$$x,x_1,x,x_2,x,x_3,\ldots$$It converges (to $x$). However, the sequence$$f(x),f(x_1),f(x),f(x_2),f(x),f(x_3),\ldots$$does not converge.