An encoded copy of s in which certain characters have been replaced by hexadecimal escape sequences.
escape( ) is a global function. It returns a new string that contains an encoded version of s. The string s itself is not modified.
escape( ) returns a string in which all characters of s other than ASCII letters, digits, and the punctuation characters @, *, _, +, -, ., and / have been replaced by escape sequences of the form %xx or %uxxxx (where x represents a hexadecimal digit). Unicode characters \u0000 to \u00ff are replaced with the %xx escape sequence, and all other Unicode characters are replaced with the %uxxxx sequence.
Use the unescape( ) function to decode a string encoded with escape( ).
escape("Hello World!"); // Returns "Hello%20World%21"