Assignment GDB Solution: Javascript


JavaScript encodeURIComponent() Function

JavaScript encodeURIComponent() Function The encodeURIComponent() function encodes a URI component. This function encodes special characters. In addition, it encodes the following characters: , / ? : @ & = + $ #. Tip: Use the decodeURIComponent() function to decode an encoded URI component. Syntax encodeURIComponent(uri) Example: Output:

Javascript Concatenating Strings

With text strings you cannot perform mathematical operations. The most common operation performed with text strings is concatenation.Concatenation refers to the act of combining two text strings into one longer text string. For instance,the following combines the strings “ab” and “cd” into the combined string “abcd”: “ab” + “cd” As with numeric mathematical operations,there are […]