Skip to content Skip to sidebar Skip to footer

Explanation Requested For FixedEncodeURIComponent

I'm wondering if anyone can explain this function to me? I've tested it and it works like a dream but I don't understand how! It's from the MDN reference here: https://developer.mo

Solution 1:

The reference to "escape" is just a reference to the global function of that name. If the second argument to .replace() is a function, then JavaScript passes the matched string to the function and replaces it with whatever the function returns.

Try typing

escape("!")

in your browser's console.


Post a Comment for "Explanation Requested For FixedEncodeURIComponent"