For limx→af(x) to exist and equal ℓ, we need f(x) to be
approximately ℓ on both sides of x=a.
limx→af(x)=ℓ⟺limx→a−f(x)=ℓ and limx→a+f(x)=ℓ.
If the two one-sided limits are different, or if one (or both) of them fail to exist, then the overall
limit doesn't exist.
Note that the value of f(a) doesn't enter into this. We only
care about what happens when x is slightly less than a, or slightly
greater than a, not what happens when x is equal to a.