
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
590 Views
Suppose, we have this JSON object where index keys are mapped to some literals −const obj = { "0": "Rakesh", "1": "Dinesh", "2": "Mohit", "3": "Rajan", "4": "Ashish" };We are required to write a JavaScript function that takes in one such object and uses the ... Read More

AmitDiwan
842 Views
We are required to write a JavaScript function that takes in a JSON object as one and only argument.The JSON object has string keys mapped to some numbers. Our function should traverse through the object, find and return the smallest value from the object.ExampleThe code for this will be −const ... Read More

AmitDiwan
827 Views
Suppose, we have a floating-point number −2.74If we divide this number by 4, the result is 0.685.We want to divide this number by 4 but the result should be rounded to 2 decimals.Therefore, the result should be −3 times 0.69 and a remainder of 0.67ExampleThe code for this will be ... Read More

AmitDiwan
132 Views
A mathematician Ulam proposed generating a sequence of numbers from any positive integer n (n>0) as follows −If n is 1, it will stop. if n is even, the next number is n/2. if n is odd, the next number is 3 * n + 1. continue with the process ... Read More

AmitDiwan
252 Views
Suppose, we have a JSON array like this −const arr = [{ "data": [ { "W": 1, "A1": "123" }, { "W": 1, "A1": "456" }, { "W": 2, "A1": "4578" }, { "W": 2, "A1": "2423" ... Read More

AmitDiwan
157 Views
We are required to write a function that takes in an array of numbers as the first argument and a target sum as the second argument. We then want to loop through the array and then add each value to each other (except itself + itself).And if the sum of ... Read More

AmitDiwan
801 Views
Suppose, we have two arrays of literals and objects respectively −const source = [1, 2, 3 , 4 , 5]; const cities = [{ city: 4 }, { city: 6 }, { city: 8 }];We are required to write a JavaScript function that takes in these two arrays. Our function ... Read More

AmitDiwan
765 Views
We are required to write a JavaScript function that takes in two objects. The function should return an array of all those common keys that have common values across both objects.ExampleThe code for this will be −const obj1 = { a: true, b: false, c: "foo" }; const obj2 = ... Read More

AmitDiwan
772 Views
We know that there are two ways we can access nested keys within an Object in JavaScript.For instance, take this object −const obj = { object: { foo: { bar: { ya: 100 ... Read More

AmitDiwan
114 Views
Suppose, we have an array of objects like this −const arr = [ { "customer": "Customer 1", "project": "1" }, { "customer": "Customer 2", "project": "2" }, { "customer": "Customer ... Read More