...

/

Solution Review: Add Elements to the List

Solution Review: Add Elements to the List

This review provides a detailed explanation of the solution to the "Add Elements to the List" challenge.

Solution

Let’s understand the solution of the challenge in Powershell and Python.

Powershell

Press + to interact
$l = [System.Collections.ArrayList]::new()
1,3,5,7|` ForEach-Object {$l.Add($_) > $null} # Initialising list in Powershell
$l.Add(9) | Out-Null
$l.Add(11) | Out-Null
$l -join ' '

Explanation:

Line ...