- A Encodes a string as a URI component
- B Decodes a URI component as a string
- C Removes special characters from a string
- D none of these
- Share this MCQ
Answer:
A
Share this MCQ
The encodeURIComponent()
function encodes a string as a URI component.
It replaces certain characters (such as spaces and special characters) with their encoded version,
which can be safely used in a URI.
Share this MCQ