Answer
\begin{align*}
\lim _{x \rightarrow 0-} f(x)&=\lim _{x \rightarrow 0+} f(x)=1\\
\lim _{x \rightarrow 2-} f(x)&=\lim _{x \rightarrow 2+} f(x)=\infty\\
\lim _{x \rightarrow 4-} f(x)&=-\infty\\
\lim _{x \rightarrow 4+} f(x)&=\infty\\
\end{align*}
The function is both left- and right-continuous at $x = 0$ and neither left- nor right-continuous at $x = 2$ and $x = 4$.
Work Step by Step
To find the limits, we notice what values the function tends toward to the left and right of each point.
\begin{align*}
\lim _{x \rightarrow 0-} f(x)&=\lim _{x \rightarrow 0+} f(x)=1\\
\lim _{x \rightarrow 2-} f(x)&=\lim _{x \rightarrow 2+} f(x)=\infty\\
\lim _{x \rightarrow 4-} f(x)&=-\infty\\
\lim _{x \rightarrow 4+} f(x)&=\infty\\
\end{align*}
We see that the function is smoothly connected at $x=0$; thus, the function is both left- and right-continuous at $x = 0$. Because we get an infinite limit at the other points, we know that the function is neither left- nor right-continuous at $x = 2$ and $x = 4$.