I would like to understand the following proof from the book "Real Analysis" by Folland.
Claim: Let $X$ be the set of complex valued functions with the product topology, i.e. topology of pointwise convergence. Then, the set of continuous functions $C(R)$ is dense in $X$
(proof): Let $f \in X$ and consider the sets $$\{g \in X: |g(x_j)-f(x_j)| <\epsilon, \text{ for } j = 1,\dots, n, n \in \mathbb{N}, x_i \in \mathbb{R}, \epsilon >0 \} $$ Then, the sets form a neighborhood base at $f$ and each of these sets clearly contains continuous functions.
I actually have no understanding of the proof. In particular,
(1) why are the sets in the proof form a neighborhood base at $f$?
(2) does the proof say that each of these sets contain all continuous functions?
(3) If I accept (1) and (2), how/why does this show $C(R)$ is dense in $X$?
(1) A basic open subset of $X=\prod_{x\in \mathbb{R}}\mathbb{C}$ is of the form
$$U=\prod_{x\in\mathbb{R}}U_x$$
with $U_x\subset \mathbb{C}$ open and at most finitely many $U_x\neq\mathbb{C}$.
Now show that for every $f\in U$ there is a set $B$ of the form described in your question such that $f\in B\subset U$.
(2) No, the proof says that each of those sets contains at least one continuous function.
(3) $A\subset X$ is dense iff $A\cap U\neq\emptyset$ for all non-empty open $U$ iff $A\cap B\neq \emptyset$ for all non-empty \textbf{basic} open $B$.