Category: javascript

Java Script @ Freshers.in

Extracting characters from a string, between two specified indices using JavaScript : substring()

The substring() method in JavaScript extracts characters from a string, between two specified indices, and returns the new sub string….

Continue Reading Extracting characters from a string, between two specified indices using JavaScript : substring()
Java Script @ Freshers.in

Extracting a section of a string and returns it as a new string in JavaScript : slice()

This article provides an in-depth look at the slice() method, complete with executable examples, ensuring you can understand and use…

Continue Reading Extracting a section of a string and returns it as a new string in JavaScript : slice()
Java Script @ Freshers.in

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…

Continue Reading How to extract single character located at a specified offset in the string using JavaScript : charAt()

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…

Continue Reading Removing whitespace from the beginning of a string using JavaScript : trimStart()
Java Script @ Freshers.in

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…

Continue Reading Removing whitespace from both ends of a string using JavaScript : trim()
Java Script @ Freshers.in

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…

Continue Reading Merging two or more strings using JavaScript: concat()