What's the duty of the escape in the JavaScript code?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What's the duty of the escape in the JavaScript code??

https://code.sololearn.com/WqcmIWxw4KO8/?ref=app

3rd Aug 2019, 2:01 AM
Joseph Onipede
Joseph Onipede - avatar
2 Answers
+ 3
Joseph, Direct from W3Schools "The escape() function was deprecated in JavaScript version 1.5. Use encodeURI() or encodeURIComponent() instead." "The escape() function encodes a string." "This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters." https://www.w3schools.com/jsref/jsref_escape.asp
3rd Aug 2019, 3:04 AM
ODLNT
ODLNT - avatar
- 1
Do you mean escape method or escape character "\" ?
3rd Aug 2019, 1:34 PM
Mukhtar Mahamed
Mukhtar Mahamed - avatar