Expert Developer JavaScript Question: Download Expert JavaScript Developer PDF

What is escape() function?

Tweet Share WhatsApp

Answer:

► The escape() function is used to encode the string to convert it as portable string so that it can be sent across any network to any computer which supports ASCII characters.
► This function encodes special characters, with the exception of @ * + - / . _
► Syntax :
escape(string1)
Where string1 is the string to be encoded.
► Example :
<script>
document.write(escape("Questions? Get from us!"));
</script>
► Output :
Questions%3F%20Get%20from%20us%21

Download Expert JavaScript Developer PDF Read All 150 Expert JavaScript Developer Questions
Previous QuestionNext Question
What is difference between undefined variable and undeclared variable?What is JavaScript, what about history?