The limit $L$ of a function $y=f(x)$ as $x$ approaches a number $c$ exists if and only if both one-sided limits exist at $c$ and both one-sided limits are equal. That is,
$\lim _{x \rightarrow c} f(x)=L \quad \iff \quad \lim _{x \rightarrow c^{-}} f(x)=\lim _{x \rightarrow c^{+}} f(x)=L$