Created Thu Nov, 21 2019 at 01:06PM

foreach loop

$trees = @("Alder","Ash","Birch","Cedar","Chestnut","Elm")

 foreach ($tree in $trees) {
   "$tree = " + $tree.length
 }


foreach ($num in 1,2,3,4,5) {
  if ($num -eq 2) { continue } ; $num
 }


foreach ($file in get-ChildItem *.txt) {
    Echo $file.name
  }