encodeURIComponent(string)
Last updated
Was this helpful?
Last updated
Was this helpful?
The encodeURIComponent()
function encodes a by replacing each instance of certain characters by one, two, three, or four escape sequences representing the encoding of the character (will only be four escape sequences for characters composed of two surrogate characters).
encodeURIComponent() requires a single string to be encoded.