I want to ask for a proof-reading of my solution to the following problem.
For any closed subset $X$ of $\mathbb{R}^n$ prove that there is a countable subset $S$ of $X$ such that every continuous function $f\colon X\to\mathbb{R}$ is determined by its values on $S$.
Proof: Define $S=\mathbb{Q}^n\cap X$. It is obvious that $S$ is countable and $\bar{S}=X$, since rationals are countable and dense in reals. The function $f$ is continuous on $X$, therefore $f(x)=\lim\limits_{x_k\to x}f(x_k)$ for any $x\in X$ and $x_k\in S$, i.e., $f$ is determined by its values on $S$.
Is my proof correct or am I missing something? I'm asking just because I came across another solution which seems to be unnecessarily complicated to me.