
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
911 Views
Suppose, we have an array of objects like this −const arr = [{ name: 'Paul', country: 'Canada', }, { name: 'Lea', country: 'Italy', }, { name: 'John', country: 'Italy', }, ];We are required to devise a way to filter an array of objects depending ... Read More

AmitDiwan
600 Views
Suppose, we have an array of objects like this −const arr = [ {id:123, value:"value1", name:"Name1"}, {id:124, value:"value2", name:"Name1"}, {id:125, value:"value3", name:"Name2"}, {id:126, value:"value4", name:"Name2"} ];Note that some of the "name" property in objects within the array are duplicate.We are required to write a JavaScript function ... Read More

AmitDiwan
1K+ Views
Suppose, we have an array of objects containing data about some cars like this −const arr = [ { 'make': 'audi', 'model': 'r8', 'year': '2012' }, { 'make': 'audi', 'model': 'rs5', ... Read More

AmitDiwan
702 Views
We are required to write a JavaScript function that takes in three argument, namely:day, month and year. Based on these three inputs, our function should find the day of the week on that date.For example: If the inputs are −day = 15, month = 8, year = 1993OutputThen the output ... Read More

AmitDiwan
531 Views
The power of the string is the maximum length of a non−empty substring that contains only one unique character.We are required to write a JavaScript function that takes in a string and returns its power.For example −const str = "abbcccddddeeeeedcba"Then the output should be 5, because the substring "eeeee" is ... Read More

AmitDiwan
482 Views
We are required to write a JavaScript function that takes in an array of arrays. Each subarray will contain exactly two items, representing the x and y coordinates respectively.Our function should check whether or not the coordinates specified by these subarrays form a straight line.For example −[[4, 5], [5, 6]] ... Read More

AmitDiwan
732 Views
Like the base−2 representation (binary), where we repeatedly divide the base 10 (decimal) numbers by 2, in the base 7 system we will repeatedly divide the number by 7 to find the binary representation.We are required to write a JavaScript function that takes in any number and finds its base ... Read More

AmitDiwan
260 Views
Suppose, we have an array of objects like this −const arr = [ { col1: ["a", "b"], col2: ["c", "d"] }, { col1: ["e", "f"], col2: ["g", "h"] } ];We are required to write ... Read More

AmitDiwan
809 Views
We are required to write a JavaScript function that takes in two strings as arguments. The function should then check the two strings for common characters and prepare a new string of those characters.Lastly, the function should return that string.The code for this will be −Exampleconst str1 = "IloveLinux"; const ... Read More

AmitDiwan
13K+ Views
Suppose we have two arrays of objects like these −const arr1 = [{id:'1', name:'A'}, {id:'2', name:'B'}, {id:'3', name:'C'}, {id:'4', name:'D'}]; const arr2 = [{id:'1', name:'A', state:'healthy'}, {id:'3', name:'C', state:'healthy'}];We are required to write a JavaScript function that takes in two such arrays. Our function should return a new filtered version ... Read More