Some definitions might be useful here.
I'm writing from my phone, so apologies for the lack of TeX.
Let f be a function from a space X to space Y.
A function is injective if for every point in your domain there is a unique point, say y, in your codomain such that the preimage of y is a single element of x. Each point of your domain has exactly one unique point corresponding to it. Written out, a function is injective iff f(a)=f(b) implies a=b for a,b in X.
A function is surjective if for every point y in Y there exists an x in X such that f(x) = y
So looking at this function, f(x) = 17, notice that is in fact a constant function.
Is it injective? No. Because f(1)=f(2)=17. So there is no unique point corresponding to f(1), f(2), and obviously 1 is not equal to 2.
Is it surjective? No. Because our target space Y is the natural numbers. So not every element of NN is mapped to by f.
Hopefully this clarifies any doubts you might have!
f:N→N
That means the codomain is defined to be $\mathbb N$. – dxiv Aug 05 '21 at 20:37