for loop – POFTUT

Tagged: for loop


Powershell ForEach Loop Statement Tutorial with Examples

ForEach is a term used to use iterate or loop over the given list, array or collection of the objects, strings, numbers etc. Forach is very popular loop mechanism where we can use different cases like loop through files, Numbers, Strings, Processes etc. Powershell version 4.0 brings some performance improvements to the ForEach loop. Syntax Foreach statement has the following syntax where we use ITEM, COLLECTION and CODE-BLOCK.

ITEM is...


How To For Loop In R Programming Language?

R is a programming language which is mainly used for statistical work. We can use for loops in R in different ways. We can use R for loop with the vector data type and in a regular way like other programming languages too. Syntax The syntax of the for loop is like below.

VAL is used in each iteration to set current element value. SEQUENCE is the list, an array...

While Loop In Java, Javascript, C++, C#, Python Programming Languages 0

While Loop In Java, Javascript, C++, C#, Python Programming Languages

Programming languages like Javascript, C++, C#, Python provides while loops in order to iterate over the given list, array, set etc. while loop is a very important part of the programming language because of its functionality. In this tutorial, we will examine and compare while loop for programming languages like Javascript, C++, C#, and Python. Javascript while loop Javascript provides different syntax of while loops. The general syntax is like...


How Enumerate In Python Programming Language?

Python provides easy to use functions and mechanisms for programmers. While dealing with collection or list types we generally need some way to enumerate them. enumerate() function is used to create an iterable or enumerable type from the given list or collection. After this operation, we can use created object to iterate with for or while structures. Simply Enumerate We will start with a simple enumerate example. We will provide a list...


Linux Bash While Loop Tutorial with Examples

Linux bash provides a lot of mechanisms to make system administrators life easier. These features are similar to the programming language features like variables, decisions, loops etc. In this tutorial we will look loops which can be implemented with for and while we have already examined for loops in the following tutorial. Bash For Loop Examples What is Loop? Loop is a mechanism where given items iterated one one by and given statement...


Bash Infinite Loop Shell Linux

How can write infinite shell that will run forever? May be I need a 5 second sleep between steps. Recently I have a issue with my routing table and I need to remove some route automatically every 5 minutes. I came up with a solution that runs every 4 minutes and clears unwanted routes. While Infinite Loop There are a lot of different ways do express our solution one of...

Enjoy this blog? Please spread the word :)