
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
312 Views
We have an array of literals like this −const arr = ["", 20191219, 20191220, 20191221, 20191222, 20191223, 20191224, 20191225];We are required to write a JavaScript function that takes in this array and a number n and if the corresponding element contains more than or equal to n characters, then the ... Read More

AmitDiwan
295 Views
We have an array of arrays like this −const arr = [ ['foo', 'bar', 'hey', 'oi'], ['foo', 'bar', 'hey'], ['foo', 'bar', 'anything'], ['bar', 'anything'] ]We are required to write a JavaScript function that takes in such array and returns an array that contains all the strings ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in a number and returns its reversed number with converting it to an array or string.Let's write the code for this function −Exampleconst num = 234567; const reverseNumber = (num, res = 0) => { if(num){ ... Read More

AmitDiwan
138 Views
We are required to write a JavaScript function that takes in an array of Numbers with positive as well as negative numbers and returns the maximum products of two numbers in one traversal.Let's write the code for this function −Exampleconst arr = [-1, -3, -4, 2, 0, -5]; const arr2 ... Read More

AmitDiwan
742 Views
We are required to write a JavaScript function that takes in an array of numbers and returns an array with all even numbers appearing on the left side of any odd number and all the odd numbers appearing on the right side of any even number.Therefore, let's write the code ... Read More

AmitDiwan
2K+ Views
We are required to write a JavaScript function that accepts two strings and a number n. The function matches the two strings i.e., it checks if the two strings contains the same characters. The function should return true if both the strings contain the same character irrespective of their order ... Read More

AmitDiwan
144 Views
We are required to write a JavaScript function that takes in two objects (possibly nested) and returns a new object with key value pair for the keys that were present in the first object but not in the secondLet's write the code for this function −Exampleconst obj1 = { ... Read More

AmitDiwan
265 Views
We are required to write a JavaScript function that takes in a string with repetitive characters and returns a new string in which all the same characters are exactly n characters away from each other. And the number should be smaller than the length of the array.For example −If the ... Read More

AmitDiwan
148 Views
We have an array of arrays that contains the marks scored by some students in some subjects −const arr = [ ['Math', 'John', 100], ['Math', 'Jake', 89], ['Math', 'Amy', 93], ['Science', 'Jake', 89], ['Science', 'John', 89], ['Science', 'Amy', 83], ['English', 'John', 82], ... Read More

AmitDiwan
934 Views
We are required to write a JavaScript function that takes in a string and a number n as two arguments (the number should be such that it exactly divides the length of string). And we have to return an array of n strings of equal length.For example −If the string ... Read More