
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
240 Views
We are required to write a JavaScript function that takes in an array of numbers as the first argument and a number as the second argument. The function should then return the number from the array which closest to the number given to the function as second argument.ExampleThe code for ... Read More

AmitDiwan
166 Views
We are required to write a JavaScript function that takes in an array of numbers. Then the function should return the index of the smallest number in the array.ExampleThe code for this will be −const arr = [3, 56, 56, 23, 7, 76, -2, 345, 45, 76, 3]; const lowestIndex ... Read More

AmitDiwan
467 Views
Suppose we have an array of objects containing some years and weeks data like this −const arr = [ {year: 2017, week: 45}, {year: 2017, week: 46}, {year: 2017, week: 47}, {year: 2017, week: 48}, {year: 2017, week: 50}, {year: 2017, week: 52}, ... Read More

AmitDiwan
415 Views
We are required to write a JavaScript function that takes in an array of numbers representing ages of some people.Then the function should bring all the ages less than 18 to the front of the array without using any extra memory.ExampleThe code for this will be −const ages = [23, ... Read More

AmitDiwan
857 Views
Suppose we have a two-dimensional array of numbers like this −const arr = [ [1, 3, 2], [5, 2, 1, 4], [2, 1] ];We are required to write a JavaScript function that groups all the identical numbers into their own separate subarray, and then the function should ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in a string as the first argument and an array of numbers. Our function should replace all the characters in the string at indices that are specified by the array elements taken as the second argument with an asterisk.ExampleThe code ... Read More

AmitDiwan
1K+ Views
Suppose, we have a JSON object like this −const obj = { a: { someKey: { propOne: '', enabled: true } }, b: { someKey: { ... Read More

AmitDiwan
191 Views
Suppose, we array of arrays like this −const arr = [ [-73.9280684530257, 40.8099975343718], [-73.9282820374729, 40.8100875554645], [-73.9280124002104, 40.8103130893677], [-73.927875543761, 40.8102554080229], [-73.9280684530257, 40.8099975343718] ];Here each subarray represents a point on a 2-D plane, and each point is a vertex of n sided polygon where n is the ... Read More

AmitDiwan
397 Views
Suppose we have two arrays, the first array contains the scheduled date for some events and the second array contains the names of those events, like this −const dates = [ { id:"1", date:"2017-11-07" }, { id:"1", ... Read More

AmitDiwan
436 Views
We are required to write a JavaScript function that takes in an array of literals and returns the count of elements that appears for the most number of times in the array.ExampleThe code for this will be −let arr = [2, 8, 4, 8, 6, 4, 7, 8]; const countOccurence ... Read More