The escape() function was deprecated in JavaScript version 1.5. Use encodeURI() or encodeURIComponent() instead.
The escape() function was deprecated in JavaScript version 1.5. Use encodeURI() or encodeURIComponent() instead.
The escape() function encodes a string.
escape(string)
Parameter | Require | Description |
---|---|---|
string | Required. | The string to be encoded |
A String, representing the encoded string
Encode a string:
console.log(escape("Need tips? this !@#$%^&*()!"));