Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
JavaScript
12.2K+ articles
Mathematical
7.7K+ articles
JavaScript-Questions
2.1K+ articles
Matrix
1.3K+ articles
JavaScript-DSA
499+ articles
javascript-array
344+ articles
javascript-string
255+ articles
JavaScript-Program
493+ posts
Recent Articles
Popular Articles
How to Check if the Matrix is a Magic Square in JavaScript?
Last Updated: 16 May 2024
We are going to Check if the Matrix is a Magic Square in JavaScript. A matrix is said to be Magic Square if the sum of elements of any row, column or diagonal is equal to ...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
Finding Sum of Alternate Elements of the Array using JavaScript
Last Updated: 25 June 2024
Given an array, our task is to find the sum of alternative elements of the array using JavaScript.Example:Input: array = { 1, 2, 3, 4, 5, 6, 7, 8}Output: 16 Explanation:Su...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
Sum of Distinct Elements of an Array using JavaScript
Last Updated: 25 June 2024
One can find a Sum of distinct elements (unique or different numbers) present in an array using JavaScript. Below is an example to understand the problem clearly.Example:I...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program of Absolute Sum of Array Elements
Last Updated: 09 June 2024
Using JavaScript, one can find the absolute sum of all elements present in an array. Below is an example to understand the problem clearly.Example:Input: [ -4, -7, 3, 10, ...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
Alternative Sorting of an Array using JavaScript
Last Updated: 05 July 2024
Alternative sorting means we have to arrange the elements of an array in such a way that the first element is the first maximum and the second element is the first minimum...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Find the Tangent of given Radian Value
Last Updated: 17 May 2024
Given a radian value, our task is to find a tangent using JavaScript. Tangent (tan) is a trigonometric function which is the ratio of the length of the side opposite to an...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
Sorting Objects by Numeric Values using JavaScript
Last Updated: 17 May 2024
Given an array of objects, our task is to sort objects by numeric values in JavaScript. An object is a complex data type in JavaScript that allows us to store collections ...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Find Smallest Number that is Divisible by First n Numbers
Last Updated: 24 June 2024
Given a number, our task is to find the smallest number that is evenly divisible by the first n numbers without giving any remainder in JavaScript.Example:Input: 10Output:...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Calculate the Frequency of Each Word in the Given String
Last Updated: 24 June 2024
Given a string, our task is to calculate the Frequency of Each Word in the Given String using JavaScript.Example:Input:"geeks for geeks is for geeks"Output:"geeks": 3 , "...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Calculate the Surface Area of a Triangular Prism
Last Updated: 20 May 2024
Given base, height, length, side1, side2, and side3, our task is to calculate the surface area of a triangular prism in JavaScript. A triangular prism is a 3D geometric sh...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Find Common Elements Between Two Sorted Arrays using Binary Search
Last Updated: 04 June 2024
Given two sorted arrays, our task is to find common elements in two sorted arrays then the program should return an array that contains all the elements that are common to...
read more
JavaScript
Web Technologies
Picked
JavaScript-DSA
JavaScript-Program
JavaScript Program to Remove Empty Strings from Array Without Loop
Last Updated: 24 June 2024
Given an array with values and empty strings, our task is to remove empty strings from an array while keeping a record of the removed elements without using explicit loops...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
Split a Sentence into Fixed-Length Blocks without Breaking Words in JavaScript
Last Updated: 09 April 2025
Given a sentence, our task is to split it into blocks of a fixed length without breaking words using JavaScript.Example:Input: Sentence= "This is a sample sentence to demo...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Program to Filter an Array with a Function that Returns a Promise
Last Updated: 24 June 2024
Given an array, our task is to filter its elements using an asynchronous function that returns a promise. This function will determine whether an element should be include...
read more
JavaScript
Web Technologies
Picked
JavaScript-Program
JavaScript Coding Practice Problem
Last Updated: 23 April 2025
The JavaScript Coding Practice Problems page provides a variety of exercises for developers at all levels. It covers almost all the JavaScript topics like operators, contr...
read more
JavaScript
Web Technologies
JavaScript-DSA
JavaScript-Program
1
2
3
4
...
33
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !