Creates a function that returns value.
value
Optional
The value to return from the new function.
Returns the new constant function.
5.0.0
var objects = times(2, constant({ 'a': 1 }));console.log(objects);// => [{ 'a': 1 }, { 'a': 1 }]console.log(objects[0] === objects[1]);// => true Copy
var objects = times(2, constant({ 'a': 1 }));console.log(objects);// => [{ 'a': 1 }, { 'a': 1 }]console.log(objects[0] === objects[1]);// => true
Creates a function that returns
value
.