
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
656 Views
Suppose we have an array of objects like this −const arr = [{a: 2, b: 5, c: 6}, {a:3, b: 4, d:1}, {a: 1, d: 2}];Each object is bound to have unique keys in itself (for it to be a valid object), but two different objects can have the common ... Read More

AmitDiwan
462 Views
Suppose we have an object like this −const obj = { key1: 56, key2: 67, key3: 23, key4: 11, key5: 88 };We are required to write a JavaScript function that takes in this object and returns a sorted array like this −const arr = [11, ... Read More

AmitDiwan
332 Views
Suppose, we have an array of objects like this −const arr = [ {id: 1, name: "Mohan"}, {id: 2, name: "Sohan"}, {id: 3, name: "Rohan"} ];We are required to write a function that takes one such array and constructs an object from it with the id property ... Read More

AmitDiwan
128 Views
Suppose, we have an array of objects like this −const arr = [ {'ID-01':1}, {'ID-02':3}, {'ID-01':3}, {'ID-02':5} ];We are required to add the values for all these objects together that have identical keysTherefore, for this array, the output should be −const output = [{'ID-01':4}, {'ID-02':8}];We will ... Read More

AmitDiwan
317 Views
Suppose we have an array like this −const arr = [ {unit: 35, brand: 'CENTURY'}, {unit: 35, brand: 'BADGER'}, {unit: 25, brand: 'CENTURY'}, {unit: 15, brand: 'CENTURY'}, {unit: 25, brand: 'XEGAR'} ];We are required to write a function that groups all the brand properties of ... Read More

AmitDiwan
970 Views
We are required to write a JavaScript function that takes in an array of String / Number literals and returns a subarray of all the elements that were palindrome in the original array.For example −If the input array is −const arr = ['carecar', 1344, 12321, 'did', 'cannot'];Then the output should ... Read More

AmitDiwan
193 Views
Suppose, we have an object like this −const products = { "Pineapple":38, "Apple":110, "Pear":109 };All the keys are unique in themselves and all the values are unique in themselves. We are required to write a function that accepts a value and returns its keyFor example: findKey(110) should ... Read More

AmitDiwan
602 Views
We are required to write a JavaScript function that takes in a string and any number of characters specified as separators. Our function should return a splitted array of the string based on all the separators specified.For example −If the string is −const str = 'rttt.trt/trfd/trtr, tr';And the separators are ... Read More

AmitDiwan
1K+ Views
We are required to write a function that, given a number, say, 123, will output an array −[100, 20, 3]Basically, the function is expected to return an array that contains the place value of all the digits present in the number taken as an argument by the function.We can solve ... Read More

AmitDiwan
352 Views
Suppose we have an array of arrays of numbers like this −const arr = [[1, 45], [1, 34], [1, 49], [2, 34], [4, 78], [2, 67], [4, 65]];Each subarray is bound to contain strictly two elements. We are required to write a function that constructs a new array where all ... Read More