![]() |
VOOZH | about |
Underscore.js _.escape() function is used to escape a special character string from inserting into HTML. Some of the strings that get escape are "&", ">", "<", "''", etc.
Note: Some special files are needed to be included while using this code directly in the browser. It is very necessary to link the underscore CDN before going and using the underscore functions in the browser. When linking the underscore.js CDN The "_" is attached to the browser as a global variable.
_.escape(string);It takes only one parameter i.e. the string.
It returns the string.
Example 1: This example shows the use of the underscore.js _.escape() function.
Output:
👁 ImageExample 2: This example shows the use of the underscore.js _.escape() function.