What is the use of decodeURI() and encodeURI()?
S.no | decodeURI() | encodeURI() |
---|---|---|
1. | The decodeURI() function works reverse to the encodeURI(), taking an encoded string and then replacing the tokens with the regular characters. | encodeURI() is used to pass the string value that the user requires to convert. This function returns the URL encoded value. |
BY Best Interview Question ON 25 Aug 2022