
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
774 Views
ProblemWe are required to write a JavaScript function that takes in a string str. Our function should construct a new string that contains only the unique characters from the input string and remove all occurrences of duplicate characters.ExampleFollowing is the code − Live Democonst str = 'hey there i am using ... Read More

AmitDiwan
593 Views
ProblemWe are required to write a JavaScript function that takes in an array of mixed data types. Our function should return an object that contains data type names as key and their value as array of elements of that specific data type present in the array.ExampleFollowing is the code − Live ... Read More

AmitDiwan
2K+ Views
ProblemWe are required to write a JavaScript function that takes in a number n. Our function should return the sum of all the natural numbers from 1 to n including both 1 and nExampleFollowing is the code − Live Democonst num = 34; const summation = (num = 1) => { let res = 0; for(let i = 1; i

AmitDiwan
1K+ Views
ProblemWe are required to write a JavaScript function that takes in a string str. Our function should create all permutations of the input string and remove duplicates, if present. This means, we have to shuffle all letters from the input in all possible orders.ExampleFollowing is the code − Live Democonst str ... Read More

AmitDiwan
178 Views
ProblemWe are required to write a JavaScript function that takes in a number n. Our function should return it with its digits in descending order. Essentially, we should rearrange the digits to create the highest possible number.ExampleFollowing is the code − Live Democonst num = 5423267; const arrangeInDescending = (num = ... Read More

AmitDiwan
216 Views
ProblemWe are required to write a JavaScript function that takes in an array and returns another function which in turn takes in a number which returns a new array which is the product of corresponding elements of the input array to the first function and the number provided to the ... Read More

AmitDiwan
374 Views
ProblemWe are required to write a JavaScript function that takes in a number and returns a string of the expanded form of the number, indicating the place value of each number.ExampleFollowing is the code − Live Democonst num = 56577; const expandedForm = (num = 0) => { const str ... Read More

AmitDiwan
150 Views
We are required to write a JavaScript function that takes in a number n. Our function should return an array of integers 1..n arranged in a way, such that the sum of each 2 consecutive numbers is a square.ExampleThe code for this will be − Live Democonst n = 15; const ... Read More

AmitDiwan
210 Views
ProblemWe are required to write a JavaScript function that takes in an array a callback function and an initial value.The function should accumulate a value over the iteration of array and finally return the value just like the Array.prototype.reduce() does.ExampleFollowing is the code − Live Democonst arr = [1, 2, 3, ... Read More

AmitDiwan
311 Views
ProblemWe are required to write a JavaScript function that takes in a number as the first argument and boolean as the second argument.The boolean specifies a leap year (if it’s true). Based on this information our function should return the date that would fall on the nth day of the ... Read More