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 10740 Articles
AmitDiwan
410 Views
Suppose, we have an array of objects like this −const homes = [ { "h_id": "3", "city": "Dallas", "state": "TX", "zip": "75201", "price": "162500" }, { "h_id": "4", ... Read More
AmitDiwan
241 Views
Suppose we have an object like this −const obj = { name: "Ramesh", age: 34, occupation: "HR Manager", address: "Tilak Nagar, New Delhi", experience: 13 };We are required to write a JavaScript function on Objects that computes their size (i.e., the number of properties in ... Read More
AmitDiwan
322 Views
Let’s say, we have an object as follows −const myObject = { "ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*" };We are required to illustrate the best way to remove the property regex to end up with new myObject?Following is the solution −const myObject = { "ircEvent": "PRIVMSG", ... Read More
AmitDiwan
2K+ Views
Suppose, we have this dummy array that contains the login info of two of many users of a social networking platform −const array = [{ email: 'usman@gmail.com', password: '123' }, { email: 'ali@gmail.com', password: '123' } ];We are required to write a JavaScript function that takes ... Read More
AmitDiwan
284 Views
A nasty zombie virus is spreading out in the digital cities. We work at the digital CDC and our job is to look over the city maps and tell which areas are contaminated by the zombie virus so the digital army would know where to drop the bombs.They are the ... Read More
AmitDiwan
375 Views
Suppose, we have an array and objects like the following −const main = [ {name: "Karan", age: 34}, {name: "Aayush", age: 24}, {name: "Ameesh", age: 23}, {name: "Joy", age: 33}, {name: "Siddarth", age: 43}, {name: "Nakul", age: 31}, {name: "Anmol", age: 21}, ]; ... Read More
AmitDiwan
544 Views
We are required to declare a function, let’s say insertAllPositions, which takes two arguments −an element, x, and an array, arr. Functions must return an array of arrays, with each array corresponding to arr with x inserted in a possible position.That is, if arr is the length N, then the ... Read More
AmitDiwan
723 Views
Suppose, we have an array of objects that contains information about marks of some students in a test −const students = [ { name: 'Andy', total: 40 }, { name: 'Seric', total: 50 }, { name: 'Stephen', total: 85 }, { name: 'David', total: 30 }, ... Read More
AmitDiwan
194 Views
Suppose we have two arrays of literals like these −const options = ['A', 'B', 'C', 'D']; const values = [true, false, false, false];We are required to write a JavaScript function that creates and returns a new Array of Objects from these two arrays, like this −const response = [ ... Read More
AmitDiwan
170 Views
We are required to write a JavaScript function that generates an array of exactly five unique random numbers. The condition is that all the numbers have to be in the range [0, 9] and the first number cannot be 0.ExampleFollowing is the code −const fiveRandoms = () => { ... Read More