In order for the limit to be 3, both the left and right limits must equal 3. But notice that
 lim
x0
f(x) = -1.