
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
250 Views
Suppose we have an array of arrays like this −const arr = [ [ "Serta", "Black Friday" ], [ "Serta", "Black Friday" ], [ "Simmons", "Black Friday" ... Read More

AmitDiwan
368 Views
Suppose we have two arrays of literals like these −const arr1 = [1, 3, 2, 4, 5, 6]; const arr2 = [1, 2, 5];We are required to write a JavaScript function that takes in two such arrays. Then our function should return a new array that contains all the elements ... Read More

AmitDiwan
305 Views
Suppose, we have an array of objects like this −const arr = [ {"title": "Assistant"}, {"month": "July"}, {"event": "Holiday"}, {"title": "Assistant"} ];We are required to write a JavaScript function that takes in one such array. Our function should then return a new array that contains all ... Read More

AmitDiwan
227 Views
Suppose we have an array of literals like this −const arr = ['cat', 'dog', 'elephant', 'lion', 'tiger', 'mouse'];We are required to write a JavaScript function that takes in one such array as the first argument and then any number of strings as second and third and many more arguments.Then our ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in two. Our function should then return a new array that contains characters alternatively from both the strings.For example: If the two strings are −const str1 = 'abc'; const str2 = 'def';OutputThen the output should be −const output = 'adbecf';ExampleThe ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in a two-dimensional array of literals.Our function should return a new array that contains all the entries from the original array but the repeating ones.ExampleThe code for this will be −const arr = [ [1, 2, 3, 4, 5], ... Read More

AmitDiwan
150 Views
We are required to write a JavaScript function that takes in an array of Numbers. Our function should return a new array that contains all the elements from the original array that are greater than the cumulative sum of all elements up to that point. We are required to solve ... Read More

AmitDiwan
1K+ Views
Suppose, we have an array of numbers like this −const arr = [1, 2, 3, 4, 5, 6];We are required to write a JavaScript function that takes in one such array and returns a new array with corresponding elements of the array being the sum of all the elements upto ... Read More

AmitDiwan
507 Views
We are required to write a JavaScript function that takes a string and an array of strings.Our function should return a new string, where all the occurrences of the word in the string that are present in the array are replaced by a whitespace.Our function should use the String.prototype.replace() method ... Read More

AmitDiwan
274 Views
Suppose, we have an array of Numbers represented by strings like this −const arr = ["1.1", "1.2", "1.3", "2.1", "2.2", "3.1", "3.2", "3.3", "4.1", "4.2"];We are required to write a JavaScript function that takes in one such array and groups all the strings starting with same number in a common ... Read More