Creates a function which always returns the same value.
function
value to always return
constant function
var fcn = constantFunction( 3.14 ); var v = fcn(); // returns 3.14 v = fcn(); // returns 3.14 v = fcn(); // returns 3.14
Creates a function which always returns the same value.
Notes
function
always returns the same reference.