First, global objects
The global (Global) object is a special object in ECMAScript because the object does not exist. (The Web browser implements global as part of the Window object)
The global object has some built-in properties and methods:
1. Uri Encoding method
The URI encoding can encode the link for sending to the browser. They replace the invalid characters with a special UTF-8 encoding, which allows the browser to accept and understand.
encodeURI () does not encode special characters that belong to URIs, such as colons, forward slashes, question marks, and # numbers
encodeURIComponent () encodes any non-standard characters it discovers (using a higher frequency because the encoding is more thorough)
After using the URI encoding, it can also be decoded by:
decodeURI () and decodeURIComponent () to decode
2. Eval () method
The eval () method acts primarily as a string parser, accepting only one parameter, which is the string of JavaScript code that executes.
Built-in objects