Sort an array of Strings in JavaScript ?
In this article, we will sort an array of strings in Javascript. we will be given an array having strings as elements we need to sort them according to the series of A-Z....
read more
Convert comma separated string to array using JavaScript
In JavaScript, it’s common to encounter comma-separated strings that need to be converted into arrays for further processing or manipulation. Whether you’re parsing user input, handling data from an external source, or performing string operations, knowing how to convert a comma-separated string to an array is important....
read more
Replace multiple strings with multiple other strings in JavaScript
In this article, we are given a Sentence having multiple strings. The task is to replace multiple strings with new strings simultaneously instead of doing it one by one, using JavaScript....
read more
How to modify an object’s property in an array of objects in JavaScript ?
Modifying an object’s property in an array of objects in JavaScript involves accessing the specific object within the array and updating its property. In this article we are going to see how to modify an object’s property in an array of objects in JavaScript...
read more
How to move an array element from one array position to another in JavaScript?
In JavaScript, we can access an array element as in other programming languages like C, C++, Java, etc. Also, there is a method called splice() in JavaScript, by which an array can be removed or replaced by another element for an index. So to move an array element from one array position to another we can splice() method or we can simply use array indexing ([])....
read more
How to check whether a passed string is palindrome or not in JavaScript ?
In this article, we are given a string, our task is to find string is palindrome or not. A palindrome is a series of numbers, strings, or letters that, when read from right to left and left to right, match each other exactly or produce the same series of characters. in simple words when number strings or characters are inverted and still provide the same outcome as the original numbers or characters....
read more
Compare the Case Insensitive strings in JavaScript
Comparing strings in a case-insensitive manner means comparing them without taking care of the uppercase and lowercase letters....
read more
How to get the number of occurrences of each letter in specified string in JavaScript ?
In this article, we are given a string, our task is to find the occurrence of a character in the string with the help of a user-defined function....
read more
How to insert a string at a specific index in JavaScript ?
In this article, we are given a string containing words and the task is to insert a new string at a given index. Inserting string at a particular position means increasing the length of the original string.There are some methods like slice( ), splice( ), and substring( ) to solve this problem which are discussed below:...
read more
Convert an Array to an Object in JavaScript
The object is defined as a key-value pair while the array is the collection of homogeneous data. we need to convert an array into an object. both are used to store the data in different formats. we will see the approach for conversion of an array into an object....
read more
How to append an element in an array in JavaScript ?
Appending an element to an array in JavaScript means adding a new item to the end of the array. , this process extends the array’s length, accommodating new data. JavaScript offers several methods for appending elements which accepts one or more elements as arguments and adds them to the end of the array....
read more
Difference between Array and Array of Objects in JavaScript
An Array is a collection of data and a data structure that is stored in a sequence of memory locations. One can access the elements of an array by calling the index number such as 0, 1, 2, 3, …, etc. The array can store data types like Integer, Float, String, and Boolean all the primitive data types can be stored in an array....
read more