This method returns the first argument it receives.
Any value
The value.
value
1.0.0
const foo = { bar: "baz" };console.log(identity(foo) === foo); // true Copy
const foo = { bar: "baz" };console.log(identity(foo) === foo); // true
This method returns the first argument it receives.