Returns the provided value unchanged.
Useful as a default callback or placeholder in higher-order functions.
The value type.
The value to return.
The same value.
identity(42); // 42identity("hello"); // "hello" Copy
identity(42); // 42identity("hello"); // "hello"
Returns the provided value unchanged.
Useful as a default callback or placeholder in higher-order functions.