Note: It is very necessary to link the underscore CDN before going and using underscore functions in the browser. When linking the underscore.js CDN, the “_” is attached to the browser as global variable.
_.constant( object );
Parameters: This function accepts single parameter object.
Return Value: This function returns the parameter as given to the function.
Below examples illustrate the _.constant() function in Underscore.js:
Please Login to comment...