encodeURI
is use to encode the URI, In this example, the input is "http://learnkode.com/Examples/Javascript/Javascript encodeURI functions" and this will get converted to "http://learnkode.com/Examples/Javascript/Javascript%20encodeURI%20functions". See the code snippet: