Step 1: Understanding the Concept
A function is injective if different inputs give different outputs and surjective if range equals codomain.
Step 2: Injective test
\(f(2) = |2| = 2\) and \(f(-2) = |-2| = 2\), so two different inputs give the same output.
Hence f is not injective.
Step 3: Surjective test
\(|x| \geq 0\) for all x, so negative real numbers such as \(-1\) are never obtained.
Range \(= [0, \infty) \neq \mathbb{R}\), so f is not surjective.
Final Answer:
The function is neither injective nor surjective.
\[ \boxed{\text{(B) }\text{neither injective nor surjective.}} \]