ForEach

We can iterate through an array using foreach.

$MyArray = "J", "o", "h", "n"
foreach ($Letter in $MyArray)
{
    $Letter
}

Last updated