- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10677 Articles for Web Development
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
2K+ Views
In the given problem statement we have to find the sum of the multiples of the given input number within the given range with the help of Javascript functionalities. So we will use a loop to iterate through the numbers from the starting range to the ending range. Understanding the Problem The problem at hand is to find the sum of multiples of the given number in the given range. So in this problem we have to calculate the sum of all the numbers that are divisible by the given number. For example: suppose we have a ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
94 Views
In the given problem statement we have to sort the given integer array but we have to keep the first item in place and sort the remaining items with the help of Javascript functionalities. So we will use some predefined functions of Javascript to solve the problem. Understanding the Problem The problem at hand is to get the sorted array of integer numbers in Javascript and the main operation in this task is to keep the first item intact in its original position. Or we can say we have to rearrange the items in the array so that ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
209 Views
In the given problem statement we have to find the exact individual count of the array of strings in the array of sentences with the help of Javascript functionalities. So we will solve using the for loops to get the required result. Understanding the Problem The problem at hand is to find the exact individual count for each string in an array of sentences with the help of Javascript. We will be given an array or string and an array of sentences. So we have to find out how many times every string is appearing in the given ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
2K+ Views
In the given problem statement we have to compute the sum of all the prime numbers with the help of Javascript functionalities. So for calculating the sum we will set the upper limit of primes numbers. Understanding the Problem The problem is to calculate the sum of all the prime numbers up to a given limit. So the prime number is a positive integer which is greater than 1 and also these numbers do not have any divisors other than 1 and itself. For example we have a limit of the primes is 10, so the prime numbers ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
322 Views
In the given problem statement we have to find the smallest multiple of the given numbers with the help of Javascript functionalities. So we will use loops to iterate through and check the multiples of the given numbers. Understanding the Problem The problem at hand is to find the smallest multiple of the given number in Javascript. The multiple of a number is a number that can be divided evenly by that number. To solve the problem we will use a loop and iterate over the numbers until we find the smallest multiple which is divisible by all ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
818 Views
In the given problem statement we have to find whether the angle brackets in the code are balanced or not with the help of Javascript functionalities. So for solving this problem we will use a stack based approach using Javascript methods. What is a Stack-based Approach ? The stack-based approach is an algorithmic technique which involves using a data structure called stack. So the stack is a collection of items which supports two main operations: push and pop. Push operation adds an item to the top of the stack and pop removes the top item from the stack. ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
946 Views
The main objective for the problem statement is to perform a circular shift on the strings in Javascript. The circular shifts can be left shirt or right shift. And implement this solution in Javascript. Understanding the Problem The problem at hand is to shift the strings circularly left and right with the help of Javascript functionalities. Circular shifting means we have to move the characters of the given string in a circular manner in which the characters that are to be shifted beyond the boundaries of the string and it should reappear at the opposite end. ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
244 Views
In the given problem statement we are required to sort the alphabets present in the string. And implement the solution with the help of Javascript functionalities. Understanding the Problem The problem we have is to create a function in Javascript with the help of it we can sort the given alphabets in the string in alphabetical order. The main objective is to take the string as input and produce a new string with the same characters but in a sorted form. For example is we have a string like "hello" so the sorted form of this string is ... Read More
![Nikitasha Shrivastava](https://www.tutorialspoint.com/assets/profiles/655298/profile/60_3988199-1684213136.jpeg)
366 Views
In the given problem statement we have to find the difference between sum of square and square of sum with the help of Javascript functionalities. So we will create two functions to do this task. Understanding the Problem The problem at hand is to calculate the sum of squares and the square of the sum for a given set of numbers in Javascript programming. The sum of squares specifies the sum of the squares of every number in the given set. On the other hand the square of the sum means summing up all the numbers in the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
196 Views
We are required to write a JavaScript function that takes in a number, say n, as the first argument, and then any number of arguments following that.The idea is to sum all numbers upto n which are divided by any of the numbers specified by second argument and after.For example −If the function is called like this −sumMultiples(15, 2, 3);Then the output should be −const output = 83;Because the numbers are −2, 3, 4, 6, 8, 9, 10, 12, 14, 15ExampleThe code for this will be −const num = 15; const sumMultiple = (num, ...arr) => { const dividesAny ... Read More