Tag: javascript
Dividing a string object into an ordered list of substrings and returns them in an array in JavaScript: split()
The split() method divides a String object into an ordered list of substrings and returns them in an array. The…
How to returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index in JavaScript : charCodeAt()
The charCodeAt() method in JavaScript returns an integer between 0 and 65535 representing the UTF-16 code unit at the given…
How to extract single character located at a specified offset in the string using JavaScript : charAt()
The charAt() method in JavaScript returns a new string consisting of the single character located at a specified offset in…
How to pad the end of a string with another string until the desired length is achieved : padEnd()
The padEnd() method in JavaScript is used to pad the end of a string with another string until the desired…
How to pads the current string with another string in JavaScript : Add 0’s to the left of a character : padStart()
The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the…
Removing whitespace from the beginning of a string using JavaScript : trimStart()
JavaScript’s trimStart() method, also known as trimLeft(), is used to remove whitespace from the beginning of a string. Similar to…
Removing whitespace from both ends of a string using JavaScript : trim()
JavaScript’s trim() method is used to remove whitespace from both ends of a string. Whitespace in this context includes all…
Merging two or more strings using JavaScript: concat()
The concat() method is used in JavaScript to merge two or more strings, returning a new string that is the…
Converting the entire characters in a string to lowercase : toLowerCase()
The toLowerCase() method in JavaScript is utilized to convert the entire characters in a string to lowercase. This doesn’t just…
Convert a string to its uppercase form using JavaScript : toUpperCase()
The toUpperCase() method in JavaScript is used to convert a string to its uppercase form. This method is particularly useful…