Let $X$ and $Y$ be finite sets. Then the set $Y^X$ is finite and $\#(Y^X) = (\#Y)^{\#X}$.
I can see how to do it combinatorially. Let $y \in Y$. There are $\#(X)$ choices for such y to come from x, therefore we have $\#Y^{\#X}$ choices. I am not sure how to do it bijectively.
Let $X=\{1,\ldots,N\}$ and $Y=\{1,\ldots,M\}$, then define the set of functions from $X$ to $Y$
$$Y^X=\{f:X\rightarrow Y\}.$$
Now, we try to construct a bijection with a new set $Z$ by $\phi:Y^X\rightarrow Z$ such that
$$f\mapsto \left(f(1), \ldots, f(N)\right).$$
There are $\underbrace{M\times \cdots \times M}_{N}$ choices in total to make. Each choice corresponds to a different function.