Returns a function that when called always returns the given value.
The value that should be returned.
A function that when called will always return the given value.
const nine = constant(9);nine() // => 9nine() // => 9nine() // => 9 Copy
const nine = constant(9);nine() // => 9nine() // => 9nine() // => 9
Returns a function that when called always returns the given value.