
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
2K+ Views
We have an object with other objects being its property value, it is nested to 2-3 levels or even more.Here is the sample object −const people = { Ram: { fullName: 'Ram Kumar', details: { age: 31, ... Read More

AmitDiwan
243 Views
We have an array of objects that contains data about some cars. The array is given as follows −const cars = [{ company: 'Honda', type: 'SUV' }, { company: 'Hyundai', type: 'Sedan' }, { company: 'Suzuki', type: 'Sedan' }, { company: 'Audi', ... Read More

AmitDiwan
638 Views
We need to write a function that reads a string and converts the odd indexed characters in the string to upperCase and the even ones to lowerCase and returns a new string.Full code for doing the same will be −const text = 'Hello world, it is so nice to be ... Read More

AmitDiwan
2K+ Views
We will be given an array of numbers / strings that contains some duplicate entries, all we have to do is to return the frequency of each element in the array.Returning an object with an element as key and its value as frequency would be perfect for this situation.We will ... Read More

AmitDiwan
1K+ Views
We are required to write a function breakString() that takes in two arguments first the string to be broken and second is a number that represents the threshold count of characters after reaching which we have to repeatedly add line breaks in place of spaces.So, let’s do it. We will ... Read More

AmitDiwan
847 Views
We have an array that contains some numbers and some strings, we are required to sort the array such that the numbers get sorted and get placed before every string and then the string should be placed sorted alphabetically.For exampleLet’s say this is our array −const arr = [1, 'fdf', ... Read More

AmitDiwan
226 Views
We are required to write a function that takes in a string as one and only argument and returns another string that has all ‘i’ and ‘o’ replaced with ‘1’ and ‘0’ respectively.It’s one of those classic for loop problems where we iterate over the string with its index and ... Read More

AmitDiwan
98 Views
A number is a gapful number when −It has at least three digits, andIt is exactly divisible by the number formed by putting its first and last digits togetherFor example:1053 is a gapful number because it has 4 digits and it is exactly divisible by 13. 135 is a gapful ... Read More

AmitDiwan
424 Views
We are given a main string and a substring, our job is to create a function, let’s say removeString() that takes in these two arguments and returns a version of the main string which is free of the substring.Here, we need to remove the separator from a string, for example ... Read More

AmitDiwan
1K+ Views
We are required to write a function removeStr() that lives on String.prototype object and takes in a string str, a character char and a number n.The function should remove the nth appearance of char from str.Let’s write the code for this −const str = 'aaaaaa'; const subStr = 'a'; const ... Read More