Even a function with 1D domain is enough: there are space-filling curves, continuous functions $$f:[a,b]\longrightarrow\Bbb R^n$$ with n-dimensional image set.
**But** the space-filling curves are very bad behaved: not differentiable and not injective.