python

How to remove the first occurrence of an item in a list in Python

Python program to remove the first occurrence of an item from a list. We will learn how to use the remove() method, pop() method and del operator with example for each.

Read
javascript

How to check if an object is an array or not in JavaScript

JavaScript program to find if an object is an array or not in two different ways. It will show how to use Array.isArray and instanceOf operator with examples.

Read
javascript

4 ways to add the digits of a number in JavaScript

JavaScript program to add the digits of a number in 4 different ways. This post will show how to add the number digits by using a while loop, for loop, by converting the number to string and with the reduce() function.

Read
javascript

6 ways in JavaScript to iterate over an array of objects

JavaScript program to iterate over an array of objects in 6 different ways. We will learn how to use a for loop, while loop, do-while loop, forEach, for...of and for...in loops.

Read
javascript

How to find all matches in an array of objects in JavaScript

Different ways in JavaScript to find the matches in an array of objects. We will learn how to use the filter method and how to filter out objects with multiple properties in JavaScript.

Read
javascript

JavaScript program to check if an element is present in an Array or not

Three ways in JavaScript to check if an element is in an array or not. We will use a loop, the indexOf method, and the includes method with examples for each.

Read
java

Java program to read user input numbers with blank spaces

How to read user input numbers with blank spaces in Java. The program will read the numbers and add them to an array. We will learn how to solve it by using a loop and by split the string.

Read
c

How to take user inputs with spaces in C program

Learn how to take user inputs with blank spaces in C programming. We will learn how to do it with scanf and with fgets method with examples.

Read
javascript

Show hide a div in JavaScript on button click

JavaScript program to show and hide a div on clicking a button. This post will show you how to write the program with HTML/CSS and how to use the same method for different div components.

Read
javascript

How to find simple interest with JavaScript

JavaScript program to find simple interest. We will learn how to solve it with a given value and how to implement it with HTML/CSS.

Read