![]() |
VOOZH | about |
Underscore.js is a library in javascript that makes operations on arrays, string, objects much easier and handy.
The _.noConflict() function is used to create a reference of the global underscore object "_" to another variable.
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 a global variable.
Syntax:
_.noConflict()
Parameters: This function does not accept any parameter.
Return Value: It returns the reference to the global underscore variable.
Example 1: When noConflict() function is not used and using "underscore" variable.
Output:
Example 2: When noConflict() function is used.