From https://en.m.wikipedia.org/wiki/Limit_of_a_function
More general subsets
Apart from open intervals, limits can be defined for functions on arbitrary subsets of $\mathbb{R}$, as follows. Let $f$ be a real-valued function defined on a subset $S$ of the real line. Let $p$ be a limit point of $S$—that is, $p$ is the limit of some sequence of elements of $S$ distinct from $p$. The limit of $f$, as $x$ approaches $p$ from values in $S$, is $L$ if, for every $ε > 0$, there exists a $δ > 0$ such that $0 < |x − p| < δ$ and(!) $x ∈ S$ implies $|f(x) − L| < ε$.
This limit is often written
$\displaystyle L={\underset {x\in S}{\lim _{x\to p}}}f(x)$.
The condition that f be defined on S is that S be a subset of the domain of f. This generalization includes as special cases limits on an interval, as well as left-handed limits of real-valued functions (e.g., by taking S to be an open interval of the form $\displaystyle (-\infty ,a)$), and right-handed limits (e.g., by taking S to be an open interval of the form $\displaystyle (a,\infty )$). It also extends the notion of one-sided limits to the included endpoints of (half-)closed intervals, so the Square root function f(x)=√x can have limit 0 as x approaches 0 from above.
(End of citation from Wikipedia)
Conclusion: The definition of Limits heavily depends in the domain of definition for the function to be investigate.