Unescape
Updated: 11/16/2019 by Computer Hope
The unescape function is used in JavaScript to decode a string encoded using the encode function, or to decode other types of encoded strings, such as URLs. For example, the JavaScript below will encode and then decode a string.
var jif = "JavaScript is fun!"; var esc_jif = escape(jif); document.write(esc_jif + "<br /><br />"); var unesc_jif = unescape(esc_jif); document.write(unesc_jif);
This displays the following results.
JavaScript%20is%20fun%21 JavaScript is fun!