It's still a function. Not a continuous function but still a function.
Do it as you normally would. If $|g(x) - c| < \epsilon$ what does that say about $|x - a|$? If you can find some way that for all $\epsilon$ there is a $\delta$ so that $|x-a| < \delta \implies |g(x) - c| < \epsilon$ then $\lim\limits_{x\rightarrow a} g(x) = c$.
Just do it the same way.
$|g(x) - c| = |g(x) - 0| = |\pm x - 0| < \epsilon \implies$
$|x| < \epsilon \implies$
$|x - 0| < \epsilon$.
So..... set $\delta = \epsilon$
$|x - 0| < \delta \implies |x| < \delta$
Either $g(x) =x$ or $g(x) = -x$. Either way $|g(x) - 0| = |g(x)| = |x| $.
So $|g(x) - 0| =|x| < \delta =\epsilon$
.... and we are done! $\lim\limits_{x\rightarrow 0} g(x) = 0$.
===
If you try to picture this function the graph will be two lines, both "blurry" with disjoint holes, making an X. As x goes toward 0, g(x) bounces around to x and -x like a flea. But at $x = 0$ both the $-x$ and $x$ lines "converge" at 0.
===
It's interesting to note $\lim\limits_{x \rightarrow a, a \ne 0} g(x)$ is not defined. (If $x \in (a-\delta, a+\delta)$ and $x$ is rational then $g(x) \in (a - \delta, a + \delta)$ but if $x$ is not rational $g(x) \in (- a - \delta, - a + \delta)$ so they don't "hone in" on anything.
If you have had the definition of continuous then it's interesting that $g(x)$ is continuous at $x = 0$ but nowhere else. If you haven't had the definiton of continuous ... well, you have something to look forward to.