Sum and product of an array: Difference between revisions

m
→‎{{header|PowerShell}}: The -join operator first appeared in PowerShell 2
(added PowerShell)
m (→‎{{header|PowerShell}}: The -join operator first appeared in PowerShell 2)
Line 659:
}</lang>
One could also let PowerShell do all the work by simply creating an expression to evaluate:
 
{{works with|PowerShell|2}}
<lang powershell>function Get-Product ($a) {
if ($a.Length -eq 0) {
Anonymous user