How to use escape characters to correctly log quotes in a string using JavaScript ?
Escape Characters are the symbols used to begin an escape command in order to execute some operation. They are characters that can be interpreted in some alternate way than what we intended to. Javascript uses ‘\‘ (backslash) in front as an escape character....
read more
Sort an Object Array by Date in JavaScript
To sort an Object Array by Date in JavaScript, we have different approaches. We are going to learn how to sort an Object Array by Date in JavaScript....
read more
How to insert an item into array at specific index in JavaScript ?
To insert an item into the array at a specific index we will break the array from the index and insert the item into the array. There is no inbuilt method in JavaScript that directly allows for the insertion of an element at any arbitrary index of an array. The possible approaches are given below....
read more
How to globally replace a forward slash in a JavaScript string ?
In JavaScript, a forward slash serves multiple purposes such as division operator, string character, etc. In this article, we will see how to globally replace a forward slash in a JavaScript string....
read more
How to Iterate Over Characters of a String in JavaScript ?
Imagine you have a sentence written on a piece of paper. In JavaScript, strings are like those sentences. You can go through each letter one by one, just like you would read the sentence word by word. This process of going through each character is called iteration. There are different ways to iterate over characters in JavaScript and let’s discuss one by one....
read more
How to add elements to an existing array dynamically in JavaScript ?
An array is a JavaScript object that can hold multiple values at a time, irrespective of the data type. In this article, we will see how to add new elements to an existing array dynamically in Javascript. We will discuss two methods in this article i.e. push() method and dynamically adding an element at any index using the index of the array....
read more
JavaScript Strip all non-numeric characters from string
In this article, we will strip all non-numeric characters from a string. In order to remove all non-numeric characters from a string, replace() function is used....
read more
Create an array of given size in JavaScript
Creating an array of a specific size can be achieved through various methods, each suited to different situations. In this article, we will explore several approaches to creating arrays of a desired size, accompanied by examples for each method....
read more
JavaScript Program to Find Duplicate Elements in an Array
We are going to learn how can we Find Duplicate Elements in an Array. Finding duplicate elements in an array means identifying and listing any values that appear more than once within the array, helping to detect and manage redundant data or repeated elements within a collection of items....
read more
Copy Array Items into Another Array in JavaScript
We will see how to copy array items into another array in JavaScript. This operation is valuable when you need to generate a new array containing either identical or a subset of elements from an original array....
read more
How to find unique characters of a string in JavaScript ?
This article aims to find unique characters in a string using JavaScript. This means that a character occurs once in the string then we cannot include it again....
read more
Role of SemiColon in various Programming Languages
Semicolon is a punctuation mark (;) indicating a pause, typically between two main clauses, that is more pronounced than that indicated by a comma. In programming, Semicolon symbol plays a vital role. It is used to show the termination of instruction in various programming languages as well, like C, C++, Java, JavaScript and Python....
read more