-
JavaScript Window atob() method
The atob() method in JavaScript is used to decode a base-64 encoded string. This method takes a single argument, which is the base-64 encoded string that you want to decode, and returns the decoded string. Here is an example of how the atob() method works: In the code example above, we first declare a string […]
-
JavaScript Window alert() method
The alert() method in JavaScript is used to display a message to the user. This method takes a string argument that specifies the message to be displayed, and displays an alert dialog box with the specified message. The alert() method blocks further execution of the script until the user dismisses the alert dialog box. Here […]
-
JavaScript String valueOf() method
The valueOf() method in JavaScript is used to return the primitive value of a string object. This method does not take any arguments, and simply returns the primitive value of the string on which the valueOf() method was called. Here is an example of how the valueOf() method works: In the code example above, we […]
-
JavaScript String trimStart() method
The trimStart() method in JavaScript is used to remove whitespace from the beginning of a string. This method does not take any arguments, and returns a new string with the leading whitespace removed. Here is an example of how the trimStart() method works: In the code example above, we first declare a string called string1 […]
-
JavaScript String trimEnd() method
The trimEnd() method in JavaScript is used to remove whitespace from the end of a string. This method does not take any arguments, and returns a new string with the trailing whitespace removed. Here is an example of how the trimEnd() method works: In the code example above, we first declare a string called string1 […]
-
JavaScript String trim() method
The trim() method in JavaScript is used to remove whitespace from the beginning and end of a string. This method does not take any arguments, and returns a new string with the leading and trailing whitespace removed. Here is an example of how the trim() method works: In the code example above, we first declare […]
-
JavaScript String toUpperCase() method
The toUpperCase() method in JavaScript is used to convert all the characters in a string to their uppercase equivalent. This method does not take any arguments, and returns a new string with all the characters in the original string converted to uppercase. Here is an example of how the toUpperCase() method works: In the code […]
-
JavaScript String toString() method
The toString() method in JavaScript is used to convert an object to a string representation. This method does not take any arguments, and returns a string representation of the object on which the toString() method was called. Here is an example of how the toString() method works: In the code example above, we first declare […]
-
JavaScript String toLowerCase() method
The toLowerCase() method in JavaScript is used to convert all the characters in a string to their lowercase equivalent. This method does not take any arguments, and returns a new string with all the characters in the original string converted to lowercase. Here is an example of how the toLowerCase() method works: In the code […]
-
JavaScript String toLocaleUpperCase() method
The toLocaleUpperCase() method in JavaScript is used to convert all the characters in a string to their uppercase equivalent, according to the rules of the current locale. This method does not take any arguments, and returns a new string with all the characters in the original string converted to uppercase. Here is an example of […]