
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
491 Views
We are required to write a JavaScript function that takes in a string and swaps the adjacent words of that string with one another until the end of that string.ExampleThe code for this will be −const str = "This is a sample string only"; const replaceWords = str => { ... Read More

AmitDiwan
147 Views
We are required to write a JavaScript function that takes in two numbers, say m and n and returns two numbers whose sum is n and product is m. If there exist no such numbers than our function should return false.ExampleThe code for this will be −const goldenNumbers = (sum, ... Read More

AmitDiwan
137 Views
We are required to write a JavaScript function that takes in an array of strings and deletes every one of the two strings that start with the same letter.For example, If the actual array is −const arr = ['Apple', 'Jack' , 'Army', 'Car', 'Jason'];Then we have to delete and keep ... Read More

AmitDiwan
91 Views
We have an array that contains some string values as well as some false values.We are required to write a JavaScript function that takes in this array and returns a string constructed by joining values of the array and omitting false values.ExampleThe code for this will be −const arr = ... Read More

AmitDiwan
564 Views
We are required to write a JavaScript function that takes in a negative integer and returns the sum of its digits.For example: If the number is −-5456OutputThen the output should be −5+4+5+6 10ExampleThe code for this will be −const num = -5456; const sumNum = num => { return ... Read More

AmitDiwan
2K+ Views
We are required to write a JavaScript function that takes in an array of numbers with duplicate entries and sums all the duplicate entries to one index.ExampleThe code for this will be −const input = [1, 3, 1, 3, 5, 7, 5, 3, 4]; const sumDuplicate = arr => { ... Read More

AmitDiwan
102 Views
We are required to write a JavaScript function that takes in a number and returns the difference of the sums of the digits at even place and the digits odd place.ExampleThe code for this will be −const num = 123456; const alternateDifference = (num, res = 0, ind = 0) ... Read More

AmitDiwan
206 Views
We have an array of numbers like this −const arr = [-1, -2, -1, 0, -1, -2, -1, -2, -1, 0, 1, 0];We are required to write a JavaScript function that counts the consecutive groups of negative numbers in the array.ExampleThe code for this will be −const arr = [-1, ... Read More

AmitDiwan
199 Views
We are required to write a JavaScript function that computes the Factorial of a number n by making use of recursive approach.ExampleThe code for this will be −const num = 9; const recursiceFactorial = (num, res = 1) => { if(num){ return recursiceFactorial(num-1, res * num); ... Read More

AmitDiwan
877 Views
Two numbers are said to be co-primes if there exists no common prime factor amongst them (1 is not a prime number).We are required to write a function that takes in two numbers and returns true if they are coprimes otherwise returns false.ExampleThe code for this will be −const areCoprimes ... Read More