A function is discontinuous if the limit of the function value approaching the point from the left is different than the limit approaching from the right.
Here, the left limit is 2 and the right limit is 1/2. The limits are different, which is why the function is discontinuous at x=-1.