2 different JavaScript programs to count the number of digits in a string

Javascript program to count the number of digits in a string. We will solve this problem in two ways, by using regular expression or regex and by using a for loop.

Read

How Java Collections.rotate method works

Learn how java.util.Collections work with example. rotate method is used to rotate the contents of a list. It takes the list and distance as parameters.

Read

2 different ways to swap two elements in an ArrayList in Java

This post will show you two different ways to swap two elements in an ArrayList in Java. The program will take the index positions from the user and swap the values in the ArrayList.

Read

Two different C++ program to find the largest of n numbers

C++ program to find the largest of n numbers. The program will take n numbers as user input and find the largest of these numbers. Learn two different ways to do it.

Read

Java Stream findAny method explanation with example

findAny method is used to get an element from a Java Stream. For an empty stream, it returns one empty optional value. For null element, it throws one NullPointerException.

Read

Java stream findFirst() explanation with example

findFirst of Stream API is used to find the first element in a stream in Java. It returns one Optional value that holds the element if found. For empty stream, one empty optional is returned.

Read

How to create your first reactjs app using create-react-app

create-react-app is used to create a reactjs project easily. This is an open sourced project that we can use to create one template for a reactjs project. This post will show you how to use create-react-app

Read

Learn to implement bubble sort in JavaScript

Learn how to implement bubble sort in JavaScript. Bubble sort sorts a list by comparing and swapping all pairs of adjacent elements. It is not the best sorting algorithm to use and it has O(n2) complexity.

Read

How to use npm uninstall to uninstall a npm package

Learn how to use npm to uninstall a package. npm uninstall command is used to remove installed package installed by using npm. It also provides a couple of flags to modify its behavior.

Read

How to exit from a function in JavaScript

In this post, we will learn how to exit from a function in JavaScript. We can use one return statement or a throw to exit from a function quickly in JavaScript.

Read