encodeURI
encodeURI('hello world') // β 'hello%20world'
encodeURI() percent-encodes characters that are not valid in a URI.
encodeURI('hello world') encodes the space as %20.
encodeURI('hello world')
%20
Challenge: Verify the encoding.