Javascript

Javascript: substring() method

This article discusses the syntax and functioning of the substring() method in javascript including various examples for illustration purposes. Usage of substring():- Javascript’s substring() method returns a string portion between the start and end indexes or to the end of the string if the endIndex is not present.  Syntax of substring():- Here, The index of […]

Javascript: substring() method Read More »

Remove leading and trailing spaces : Javascript String

Often there is a requirement to remove leading and trailing spaces while working with javascript strings. This article will discuss removing the spaces from the start and end of a string in javascript using simple methods and illustrative examples. Table of Contents:- Javascript remove leading and trailing spaces from a string using RegEx() Javascript remove

Remove leading and trailing spaces : Javascript String Read More »

Javascript: Remove backslash escaping

This article will discuss removing backslash escape character from a javascript string using simple methods and example illustrations. Table of Contents:- Javascript remove escape character from a string using replace() Javascript remove escape character from a string using replaceAll() Javascript remove escape character from a string using split() and join() Javascript remove backslash escape from

Javascript: Remove backslash escaping Read More »

Javascript: 4 ways to do case-insensitive comparison

A general requirement while working in javascript is case-insensitive string comparisons. Case-insensitive comparison means equating strings irrespective of their case. It does not matter if the string is in upper-case or lower-case. We need to equate them and check if they are the same. While there are multiple ways to perform this job, each technique

Javascript: 4 ways to do case-insensitive comparison Read More »

Javascript: Remove everything after a certain character

At times we need to do certain operations on strings while working in javascript, and one such requirement is to remove everything after a specific character in a string. Table of Contents:- Javascript remove everything after a certain character using split() Javascript remove everything after a certain character using substring() Javascript remove everything after a

Javascript: Remove everything after a certain character Read More »

Remove first and last double quotes from a string in javascript

While working in javascript, sometimes we need to remove double quotes (“) from the start and end. This article will discuss removing double quotes from a javascript string at the first and last position using simple methods and example illustrations. Table of Contents:- Javascript remove double quotes from start and end of a string using

Remove first and last double quotes from a string in javascript Read More »

Scroll to Top