RosettaCodeData/Task/Loops-Foreach/PowerShell/loops-foreach.psh

8 lines
254 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
$colors = "Black","Blue","Cyan","Gray","Green","Magenta","Red","White","Yellow",
"DarkBlue","DarkCyan","DarkGray","DarkGreen","DarkMagenta","DarkRed","DarkYellow"
foreach ($color in $colors)
{
Write-Host "$color" -ForegroundColor $color
}