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
313 Views
Suppose, we have an array of objects like this −const arr = [ {"goods":"Wheat ", "from":"GHANA", "to":"AUSTRALIA"}, {"goods":"Wheat", "from":"USA", "to":"INDIA"}, {"goods":"Wheat", "from":"SINGAPORE", "to":"MALAYSIA"}, {"goods":"Wheat", "from":"USA", "to":"INDIA"}, ];We are required to write a JavaScript function that takes in one such array. The goal of function is to ... Read More
AmitDiwan
632 Views
Suppose, we have a string like this −const str = 'dress/cotton/black, dress/leather/red, dress/fabric, houses/restaurant/small, houses/school/big, person/james';We are required to write a JavaScript function that takes in one such string. The function should then prepare an object of arrays like this −const output = { dress = ["cotton", "leather", "black", ... Read More
AmitDiwan
573 Views
Suppose, we have a constructor class that creates Shoe objects like this −class Shoe { constructor(name, price, type) { this.name = name; this.price = price; this.type = type; } };We are using this class to fill an array with ... Read More
AmitDiwan
241 Views
Suppose, we have a nested array of numbers like this −const arr = [ [ 0, 0, 0, −8.5, 28, 8.5 ], [ 1, 1, −3, 0, 3, 12 ], [ 2, 2, −0.5, 0, 0.5, 5.3 ] ];We are required to write a JavaScript function that ... Read More
AmitDiwan
746 Views
Suppose, we have an array of objects like this −const arr = [ { id: '1', name: 'name 1', parentId: null }, { id: '2', name: 'name 2', parentId: null }, { id: '2_1', name: 'name 2_1', parentId: '2' }, { id: '2_2', name: 'name 2_2', ... Read More
AmitDiwan
193 Views
We are required to write a JavaScript function that calculates the nth root of a number and returns it.ExampleThe code for this will be −const findNthRoot = (m, n) => { try { let negate = n % 2 == 1 && m < 0; ... Read More
AmitDiwan
153 Views
We are required to write a JavaScript function that takes in a number. The function should divide the number into chunks according to the following rules −The number of chunks should be a power−of−two, Each chunk should also have a power-of-two number of items (where size goes up to a ... Read More
AmitDiwan
1K+ Views
Suppose, we have an array of objects containing some data about some users like this −const arr = [ { "name":"aaa", "id":"2100", "designation":"developer" }, { "name":"bbb", "id":"8888", "designation":"team lead" ... Read More
AmitDiwan
383 Views
Suppose, we have an array of two numbers that specify a range. We are required to write a function that finds the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.The range ... Read More
AmitDiwan
329 Views
Suppose, we have a JSON array of objects like this −const arr = [ { "id": "03868185", "month_10": 6, }, { "id": "03870584", "month_6": 2, }, { "id": "03870584", ... Read More