Show that closure of a separable space is separable. Let $A$ be a separable subset of a metric space $(M,d)$.

Show that $\overline {A}$ is separable.

Since $A$ is separable ,$A$ has a countable dense subset say $D$.But $\overline D=A$.
I can't make $\overline D=\overline A$. What should I do?
Please help me.
 A: Since $A$ is separable so $A$ has a countable dense subset say $D$.
Let $U(\neq \emptyset)$ be a  open set in $\bar A$.Let $x\in U$.
Since $x\in \bar A$ so any open set containing $x$ must intersect $A$.So $U\cap A\neq \emptyset$.
Now $U\cap A $ is open in $A$ and $D$ being dense in $A$ so $U\cap D=U\cap (A\cap D)=(U\cap A)\cap D\neq \emptyset$
.
So  $\bar A$ has a countable dense subset  $D$.
A: For the topology induced by $(M,d)$ on $A$, you have $\overline{D}=A$.
But for the topology $(M,d)$, you have $A \subset \overline{D}$.
So, $A \subset \overline{D}$. And $\overline{D}$ is closed. So $\overline{A} \subset \overline{D}$ because $\overline{A}$ is the smallest closed set containing $A$.
And $D \subset \overline{A}$, so $D$ is dense in $\overline{A}$.
A: There is a theorem of general topology that says that, for $Z\subseteq Y\subseteq X$, it holds $\overline Z^Y=Y\cap \overline Z^X$. So, you know that $A=\overline D^A=A\cap \overline D^M$
So $\overline D^M=\overline{\color{blue}{\overline D^M}}^M\color{blue}\supseteq \overline{\color{blue}A}^M$. On the other hand, $D\subseteq A\implies\overline D^M\subseteq \overline A^M$.
