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
1K+ Views
Let’s say, we have a two-dimensional array that contains data about some colors and fruits like thisconst data = [ ['orange', 'fruit'], ['red', 'color'], ['green', 'color'], ['orange', 'color'], ['banana', 'fruit'], ['blue', 'color'], ['lemon', 'fruit'], ['mango', 'fruit'], ['lemon', 'color'], ];We have to ... Read More
AmitDiwan
1K+ Views
Let’s say, we have a two-dimensional array that contains some data about the age of some people.The data is given by the following 2D arrayconst data = [ ['Rahul', 23], ['Vikky', 27], ['Sanjay', 29], ['Jay', 19], ['Dinesh', 21], ['Sandeep', 45], ['Umesh', 32], ... Read More
AmitDiwan
402 Views
We are required to write a function, that takes in an array of Number literals as one and the only argument. The numbers that are situated at even index should be returned as it is. But the numbers situated at the odd index should be returned multiplied by their corresponding ... Read More
AmitDiwan
161 Views
We have to write a function that accepts an array of strings and a string. Our job is to check whether the array contains any sequence or subsequence of the string as its element or not, and the function should return a boolean based on this fact.For instance −const x ... Read More
AmitDiwan
164 Views
We are required to write a function that takes in an array of two numbers a and b (a >= b) and returns the least common multiple of all the numbers between [a, b].ApproachWe will first write a basic function that calculates the least common multiple of two numbers, once ... Read More
AmitDiwan
884 Views
We are required to write a function that accepts two numbers and returns their least common multiple.Least Common Multiple (LCM)The least common multiple of two numbers a and b is the smallest positive integer that is divisible by both a and b.For example − The LCM of 6 and 8 ... Read More
AmitDiwan
263 Views
Let’s say, we have an array of objects like this −const arr = [{ country: "cananda", count: 2 }, { country: "jamaica", count: 2 }, { country: "russia", count: 1 }, { country: ... Read More
AmitDiwan
351 Views
We are required to write a recursive function, say pickString that takes in a string that contains a combination of alphabets and numbers and returns a new string consisting of only alphabets.For example, If the string is ‘dis122344as65t34er’, The output will be: ‘disaster’Therefore, let’s write the code for this recursive ... Read More
AmitDiwan
4K+ Views
We have to write a function, say findPositions() that takes in two arrays as argument. And it should return an array of the indices of all the elements of the second array present in the first array.For example −If the first array is [‘john’, ‘doe’, ‘chris’, ‘snow’, ‘john’, ‘chris’], And ... Read More
AmitDiwan
291 Views
We are required to write a function for arrays Array.prototype.remove(). It accepts one argument; it is either a callback function or a possible element of the array. If it’s a function then the return value of that function should be considered as the possible element of the array and we ... Read More