Take note that you have ready been given a perfectly good example. However, the function is discontinuous everywhere.
Here is an example with infinitely many zeros and countably many discontinuities.
To understand it you must know some topology of the real number line.
Note: \(\displaystyle (0,1] = \bigcup\limits_{n = 1}^\infty {\left( {\frac{1}{{n + 1}},\frac{1}{n}} \right]} .\)
So:\(\displaystyle x \in (0,1] \Rightarrow \quad \exists (J)\left[ {x \in \left( {\frac{1}{{J + 1}},\frac{1}{J}} \right]} \right]\).
Now define the function.
\(\displaystyle \L f(x) = \left\{ {\begin{array}{rr}
{1,} & {x > 1} \\
{2J(J + 1)\left( {x - \frac{1}{J}} \right) + 1,} & {x \in (0,1]} \\
{ - 1,} & {x \le 0} \\
\end{array}} \right.\)