Continuous functions with values in separable Banach space dense in $L^{2}$?

Let $[0,1] \subset \mathbb R$ be a the compact interval in the real numbers $\mathbb R$.
We know that $C([0,1] \to \mathbb R)$ (the continuous function on $[0,1]$ with values in $\mathbb R$) are dense in $L^{2} ([0,1] \to \mathbb R)$ (the usual Lebesgue space).

Now consider the Lebesgue space of functions on $[0,1]$, that take values in a separable Banach space $X$, i.e. $L^{2} ([0,1] \to X)$.
This space is equipped with the norm $\int_{[0,1]} | f(t) |_{X}^{2} d t$, where $|.|_{X}$ is the norm on $X$.

Are the continuous functions with values in this space, i.e. $C([0,1] \to X)$, also dense in $L^{2} ([0,1] \to X)$ ?

For a concrete example, I am in particular interested in $X = C([1,2] \to \mathbb R )$, i.e. is $C([0,1] \to C([1,2] \to \mathbb R ))$ dense in $L^{2} ([0,1] \to C([1,2] \to \mathbb R ))$?

Edit: This question is related to this question, by a different order of the spaces.

Solutions Collecting From Web of "Continuous functions with values in separable Banach space dense in $L^{2}$?"

Yes. Ignoring questions of measurability: Suppose $f:[0,1]\to X$ and $\int_0^1||f(t)||_X^2\,dt<\infty$.

Say $X_n$ is an increasing sequence of finite-dimensional subspaces of $X$ so that $\bigcup X_n$ is dense in $X$. For each $n$ choose $f_n:[0,1]\to X_n$ such that, say, $$||f_n(t)-f(t)||_X\le 2 d(f(t),X_n)$$for all $t\in [0,1]$. Note that $||f_n(t)||_X\le 3||f(t)||_X$. Since $||f_n(t)-f(t)||_X\to0$ for all $t$, dominated convergence shows that $$\int_0^1||f_n(t)-f(t)||_X^2\,dt\to0.$$

Since $X_n$ is finite-dimensional there certainly exists a continuous function $g_n:[0,1]\to X_n$ with $$\int_0^1||g_n(t)-f_n(t)||_X^2\,dt<\frac1n;$$this is immediate from the scalar-valued case. QED.