
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
147 Views
We have the following arrays of objects, we need to merge them into one removing the objects that have redundant value for the property name −const first = [{ name: 'Rahul', age: 23 }, { name: 'Ramesh', age: 27 }, { name: 'Vikram', age: ... Read More

AmitDiwan
147 Views
Let’s say we have a students object containing two properties names and marks. The names is an array of object with each object having two properties name and roll, similarly marks is an array of object with each object having properties mark and roll. Our task is to combine the ... Read More

AmitDiwan
1K+ Views
Here is a simple star pattern that we are required to print inside the JavaScript console. Note that it has to be printed inside the console and not in the output or HTML window −* * * * * * * * * * * * * * * * ... Read More

AmitDiwan
354 Views
Let’s say we have a code snippet here that produces some startling results. Firstly, we see that the modulo operator is working fine with strings as well (surprisingly). Secondly, concatenation of two strings produces awkward results.We need to explain why JavaScript does so?Here’s the problem code −Exampleconst numStr = '127'; ... Read More

AmitDiwan
247 Views
One property of the Array.prototype.sort() function is that it is an inplace sorting algorithm, which means it does not create a new copy of the array to be sorted, it sorts the array without using any extra space, making it more efficient and performant. But this characteristic sometimes leads to ... Read More

AmitDiwan
166 Views
Let’s say here is a sample code snippet and we are required to tell the possible output for this snippet and provide an explanation for itvar name = 'Zakir'; (() => { name = 'Rahul'; return; console.log(name); function name(){ let lastName = 'Singh'; ... Read More

AmitDiwan
1K+ Views
Let’s try to understand ‘?.’ with an example.Consider the following object example describing a male human being of age 23 −const being = { human: { male: { age: 23 } } };Now let’s say we want to ... Read More

AmitDiwan
459 Views
We have an array of array, each subarray contains exactly two elements, first is a string, a person name in this case and second is a integer, what we are required to do is combine all those subarrays that have their first element same and the second element should be ... Read More

AmitDiwan
7K+ Views
Our aim is to write a JavaScript function that takes in a number and returns its reversed numberFor example, reverse of 678 −876Here’s the code to reverse a number in JavaScript −Exampleconst num = 124323; const reverse = (num) => parseInt(String(num) .split("") .reverse() .join(""), 10); console.log(reverse(num));OutputOutput in the console will ... Read More

AmitDiwan
1K+ Views
Here, we need to write a function that takes one argument, which is an array of numbers, and returns an array that contains only the numbers from the input array that are even.So, let's name the function as returnEvenArray, the code for the function will be −Exampleconst arr = [3, ... Read More