Question: $$\frac{1}{2+\frac{1}{x}}$$
What's the output of this function when $x=0$?

I tried graphing it on Desmos and it shows a curve passing through the origin so the output must be equal to zero, however I don't get how it reached this result.

The only way it could have reached it is maybe by changing the equation a little bit:

$$\frac{1\cdot x}{(2+\frac{1}{x})\cdot x}$$ (where $x\neq0$)
$$\frac{x}{2x+{1}}$$

However since we stated in the first step that $x$ can't be equal to zero we can't make it equal to zero again and solve with the simplified version we've just arrived at:

at $x=0$,

$$\frac{0}{0+{1}}=0$$ $\rightarrow$ *so this is wrong*

How did Desmos then arrive at the answer?

Answer: 
When $x$ is close to zero, $1/x$ is very large. Hence,
$$
\frac{2}{2+\frac{1}{x}}=\frac{2}{1+\text{very large}}
$$
and
$$
\frac{2}{1+\text{very large}}=\text{very close to $0$} \, .
$$
In the language of limits, we can say that
$$
\lim\_{x \to 0}\frac{2}{2+\frac{1}{x}}=0 \, .
$$
But this *doesn't* mean that when $x$ equals $0$,
$$
\frac{2}{2+\frac{1}{x}}=\frac{2}{2+\frac{1}{0}}=0 \, .
$$
The above expression doesn't make any sense, because we are not allowed to divide by zero. What we can say is that as $x$ gets very close to $0$, $2/(2+1/x)$ is also very close to $0$. The graph is misleading: because our eyes cannot discern what happens at a single point, it *looks* as if the curve crosses the origin, even though it does not.
Take the limit as x tends to 0 from above, this will be 0 as 1/x tends to infinity. Then take the limit as x tends to 0 from below, this will also be zero, as 1/x tends to minus infinity. Therefore, despite the fact the function has no value at x = 0, arbitrarily close to x=0 from any direction (0-delta, 0+delta), the function will approach 0.