
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
254 Views
We are required to write a JavaScript function that takes in a binary number as a string and returns its numerical equivalent in base 10. Therefore, let’s write the code for the function.This one is quite simple, we iterate over the string using a for loop and for each passing ... Read More

AmitDiwan
2K+ Views
We have to write a function that takes in a string as one and only argument, and return its equivalent number.For example −one five seven eight -------> 1578 Two eight eight eight -------> 2888This one is pretty straightforward; we iterate over the array of words splitted by whitespace and ... Read More

AmitDiwan
333 Views
Let’s say, we have to write a function that takes an array of numbers as argument. We have to return a new array with the products of each number except the index we are currently calculating product for.For example, if arr had 5 indices and we were creating the value ... Read More

AmitDiwan
1K+ Views
We have an array of Number literals like this −const numbers = [10, 6200, 20, 20, 350, 900, 26, 78, 888, 10000, 78, 15000, 200, 1280, 2000, 450];We are supposed to write a function that takes an array of numbers and a number between [0, 100], basically this number represents ... Read More

AmitDiwan
2K+ Views
We have to write a function that removes every second character (starting from the very first character) from a string and appends all of those removed characters at the end in JavaScript.For example −If the string is "This is a test!" Then it should become "hsi etTi sats!"Therefore, let’s write ... Read More

AmitDiwan
1K+ Views
We have an array of objects. Each object contains a few properties and one of these properties is age −const people = [ { name: 'Anna', age: 22 }, { name: 'Tom', age: 34 }, ... Read More

AmitDiwan
275 Views
We are required to write a function that takes two numbers as arguments m and n, and it returns the sum of all even numbers that falls between m and n (both inclusive)For example −If m = 10 and n = -4The output should be 10+8+6+4+2+0+(-2)+(-4) = 24ApproachWe will first ... Read More

AmitDiwan
2K+ Views
Let’s say, we have an array of objects with each object having exactly two properties, x and y that represent the coordinates of a point. We have to write a function that takes in this array and an object with x and y coordinates of a point and we have ... Read More

AmitDiwan
338 Views
Let’s say, we have two arrays, one of String literals and another of objects.const data = [{ name: 'Kamlesh Kapasi', uid: 123 }, { name: 'Mahesh Babu', uid: 129 }, { name: 'Akshay Kapoor', uid: 223 ... Read More

AmitDiwan
745 Views
We have to write a function that takes an array and any number of strings as arguments. The task is to check if the strings occur within the array. If it does, we have to move that particular to the front of the array.Therefore, let’s write the code for this ... Read More