
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
297 Views
Let’s say, we have a string and an array −const textString = 'Convert javascript array iteration result into a single line text string. Happy searching!'; const keywords = ['integer', 'javascript', 'dry', 'Happy', 'exam'];We have to write a function that maps the array to a string containing only true and false ... Read More

AmitDiwan
910 Views
Let’s say, we have to write a function that takes in a binary string (consisting of only 0 and 1) and returns its inverse, all 0s replaced by 1 and 1s replaced by 0.Let’s write the code for this function −Exampleconst num = '1101'; const n = '11010111'; const inverseBinary ... Read More

AmitDiwan
2K+ Views
Let’s say, we have the following array of objects −const arr = [ {id: 1, h1: 'Daily tests'}, {id: 2, h1: 'Details'}, {id: 1, h2: 'Daily classes'}, {id: 3, h2: 'Results'}, {id: 2, h3: 'Admissions'}, {id: 1, h4: 'Students'}, {id: 2, h5: 'Alumni'}, ... Read More

AmitDiwan
343 Views
Let’s say, we have the following array of objects sorted according to its id property −const unordered = [{ id: 1, string: 'sometimes' }, { id: 2, string: 'be' }, { id: 3, string: 'can' }, { id: 4, string: 'life' }, ... Read More

AmitDiwan
632 Views
Let’s say, we have an object with keys as string literals and their values as objects as well like this −const companies = { 'landwaves ltd': {employees: 1200, worth: '1.2m', CEO: 'Rajiv Bansal'}, 'colin & co': {employees: 200, worth: '0.2m', CEO: 'Sukesh Maheshwari'}, 'motilal biscuits': {employees: 975, ... Read More

AmitDiwan
750 Views
Let’s say, we have two arrays of equal lengths and are required to write a function that maps the two arrays into an object. The corresponding elements of the first array becomes the corresponding keys of the object and the elements of the second array become the value.We will reduce ... Read More

AmitDiwan
236 Views
Let’s say, we have an array that contains some numbers, our job is to write a function that takes in the array and maps all the values relative to 0 to 100. Means that the greatest number should get replaced by 100, the smallest by 100 and all others should ... Read More

AmitDiwan
332 Views
Let’s say, we have an array that contains some numbers, positive, negative, decimals and integers. We have to write a function that takes in an array and returns an array of square of all the positive integers from the original array.Let’s write the code for this function −Exampleconst arr = ... Read More

AmitDiwan
666 Views
We have an array of Number / String literals that contain some duplicate values, we have to remove these values from the array without creating a new array or storing the duplicate values anywhere else.We will use the Array.prototype.splice() method to remove entries inplace, and we will take help of ... Read More

AmitDiwan
537 Views
Let’s say, here is an array that contains some data about the stocks sold and purchased by some company over a period of time.const transactions = [ ['AAPL', 'buy', 100], ['WMT', 'sell', 75], ['MCD', 'buy', 125], ['GOOG', 'sell', 10], ['AAPL', 'buy', 100], ['AAPL', 'sell', ... Read More