Skip to content

implement indexer in loop #14724

@p0W3RH311

Description

@p0W3RH311

Hi guys !

loops in powershell is various and its awesome but it missing an indexer for example:


foreach($index,$item in $list) {
    "$index = $item"
}

is more elegant and short:

$index =  0
foreach($item in $list) {
    "$index = $item"
     $index++
}


Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-DeclinedThe proposed feature is declined.WG-Languageparser, language semantics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions