
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
1K+ Views
We have an array of arrays and are required to write a function that takes in this array and returns a new array that represents the sum of corresponding elements of original array.If the original array is −[ [43, 2, 21], [1, 2, 4, 54], [5, 84, ... Read More

AmitDiwan
565 Views
We are required to write a JavaScript recursive function that takes in a number and returns the greatest digit in the number.For example: If the number is 45654356Then the return value should be 6ExampleThe code for this will be −const num = 45654356; const greatestDigit = (num = 0, greatest ... Read More

AmitDiwan
117 Views
We are required to write a JavaScript function that takes in a string with at least one vowel, and for each character in the string we have to map a number in a string representing its nearest distance from a vowel.For example: If the string is −const str = 'vatghvf';OutputThen ... Read More

AmitDiwan
180 Views
We are required to write a JavaScript function that takes in a string and converts it to snake case.Snake case is basically a style of writing strings by replacing the spaces with '_' and converting the first letter of each word to lowercase.ExampleThe code for this will be −const str ... Read More

AmitDiwan
578 Views
We are required to write a JavaScript function that takes in a string and returns the index of the first character that appears twice in the string. If there is no such character then we should return -1.Let’s say the following is our string −const str = 'Hello world, how ... Read More

AmitDiwan
447 Views
We are required to write a JavaScript function that takes in two strings and find the number of corresponding dissimilarities in the strings. The corresponding elements will be dissimilar if they are not equalExampleLet’s say the following are our strings −const str1 = 'Hello world!!!'; const str2 = 'Hellp world111';ExampleThe ... Read More

AmitDiwan
356 Views
We are required to write a JavaScript function that takes in a string and reverses the words in the string that have an even number of characters in them.Let’s say the following is our string −const str = 'This is an example string';We want to reverse the even length words ... Read More

AmitDiwan
139 Views
We have to write a function that takes in an array and returns the index of the first nonconsecutive number from it.Like all the numbers will be in an arithmetic progression of common difference 1. But the number, which violates this rule, we have to return its index. If all ... Read More

AmitDiwan
121 Views
We have to write a function that creates an array with elements repeating from the string till the limit is reached.Suppose there is a string ‘aba’ and a limit 5.e.g. string = "string" and limit = 8 will give new arrayconst arr = ["s", "t", "r", "i", "n", “g”, “s”, ... Read More

AmitDiwan
266 Views
We are required to write a function that takes in a string as the first and the only argument and constructs an object with its keys based on the unique characters of the string and value of each key being defaulted to 0.For example: If the input string is −const ... Read More