I don't have a use case for this but I was recently asked this very question and w3schools helpfully tells you the characters are ignored but not why.
Anyone have any idea why this might be the case?
Thanks, David
I don't have a use case for this but I was recently asked this very question and w3schools helpfully tells you the characters are ignored but not why.
Anyone have any idea why this might be the case?
Thanks, David
Share Improve this question edited Jun 8, 2011 at 1:37 Billy ONeal 107k61 gold badges329 silver badges563 bronze badges asked Jun 3, 2009 at 14:32 DavidDavid2 Answers
Reset to default 7The escape
function is deprecated. Use encodeURI
and encodeURIComponent
instead.
From your source: "The escape() function encodes a string, so it can be read on all puters." Those characters are standard in the ASCII set, so there's no point in encoding them for this particular purpose.