How to merge two arrays and remove duplicate items in JavaScript ?
Merging two arrays while eliminating duplicate items in JavaScript involves combining the arrays into a single array and then removing any duplicate elements. This ensures that the resulting array contains only unique items from both original arrays, facilitating efficient data management and manipulation....
read more
Find all the combinations of the array values in JavaScript
The task is to get the Cartesian product of the arrays (Finding all combinations after concatenating them). Here, 2 approaches are discussed with the help of JavaScript....
read more
How to replace line breaks with br tag using JavaScript ?
In JavaScript, you can replace line breaks (\n or \r\n) with <br> tags in a string using different approaches. But before learning the approaches, let’s see an example....
read more
How to splice an array without mutating the original Array?
In this article, we will be extracting the range of elements from an array without mutating it. Here, mutation means the changing of the original array. There is a built-in function that is made for the extraction of elements from the array but it mutates the array....
read more
What is a Webcrawler and where is it used?
Web Crawler is a bot that downloads the content from the internet and indexes it. The main purpose of this bot is to learn about the different web pages on the internet. This kind of bots is mostly operated by search engines. By applying the search algorithms to the data collected by the web crawlers, search engines can provide the relevant links as a response for the request requested by the user. In this article, let’s discuss how the web crawler is implemented....
read more
Check an array of strings contains a substring in JavaScript
Checking if an array of strings contains a substring in JavaScript involves iterating through each string in the array and examining if the substring exists within any of them. This process ensures efficient detection of the substring’s presence within the array....
read more
Javascript Program To Check For Balanced Brackets In An Expression (Well-Formedness) Using Stack
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp....
read more
Different ways to delete an item from an array using JavaScript
In Javascript, we do not have any array.remove() method for deleting the element. we will have an array and we need to delete a given item from that array and return the resulting array in the console....
read more
How to remove n elements from the end of a given array in JavaScript ?
In this article, we will learn how to remove the last n elements from the end of the given array in JavaScript....
read more
How to Get the Difference Between Two Arrays in JavaScript ?
The problem is to find the difference between two arrays in JavaScript. The objective is to identify the elements that exist in one array but not in the other and return them as a new array....
read more
Javascript Program To Remove Duplicates From A Given String
Write a javascript program for a given string S which may contain lowercase and uppercase characters. The task is to remove all duplicate characters from the string and find the resultant string....
read more
JavaScript Programs
JavaScript Programs contains list of articles based on programming. This article contains wide collection of programming articles based on Numbers, Maths, Arrays, Strings, …, etc. that are mostly asked in interviews....
read more