How-to articles, tricks, and solutions about LOOP
Read this tutorial and find methods of checking whether a JavaScript object is empty or not. Choose the best one for you and get the code immediately.
You can either loop through the arrays or convert them to string and then compare. This tutorial provides several fast methods of comparing two arrays.
Read this JavaScript tutorial and learn several useful methods of copying array items into another array. Get to know which method to choose for your case.
It is frequently necessary to count the number of keys/properties of an object in JavaScript. Find several solutions to that issue in this short tutorial.
In this snippet, we are going to figure out how to successfully determine the first and last iteration in a foreach loop with the help of PHP.
Here is a short tutorial where you can find three helpful methods allowing to find the foreach index with the help of PHP.
Read this JavaScript tutorial and learn about the methods used to find the minimum and maximum number of elements in an array. Find the fastest solution.
Read this tutorial and learn about several methods used for detecting the property values of an object without knowing the key based on specifications.
Read this JavaScript tutorial and learn about two methods of getting the first key name of an object. Get one-liner codes and make your work done properly.
Read this JavaScript tutorial and learn several useful, fast and simple methods that are used for getting the index of an array that contains objects.
Read this tutorial and learn about several methods of getting the value of the input textbox value without wrapping the input element inside a form element.
Read this tutorial and learn useful information about the two popular built-in methods that are used for listing the properties of the object in JavaScript.
The most common ways to loop through an array in JavaScript are the for, for/in and while loops. See how to use them. Examples.
Read this JavaScript tutorial and learn some useful information about the method of looping through an Array and removing items without breaking for loop.
Read this tutorial and learn several useful methods of looping through or enumerate a JavaScript object. Try and copy the piece of the code right away.
In this snippet, we demonstrate the simplest way of measuring the execution time of a string in PHP. Read on and check out the examples.
Here, we provide a snippet, explaining how to separate odd and even elements from an array without using a loop in PHP. Read on and check out the examples.
Read the tutorial and find several easy and fast approaches to splitting a JavaScript array into smaller chunks. Choose one of the methods and try examples.
The continue and break keywords are used to control the whole program flow. This snippet will show you examples of how to use these keywords in PHP.