Im trying to join a number of elements of an array into a string using this;
$a = 'h','e','l','l','o' $b = [string]::join('', $a[0,1,2,3])
But I get a ‘Missing ‘)’ in method call’ error. The join documentation only mentions joining all the elements of an array, not elements at specific indexes. Can this be done?
Cheers
Andy
Wrap the content of ‘$a[0,1,2,3]’ with ‘$()’ or ‘()’
— Or —
you can use range operator ‘..’