0

I got two variables, filled with:

$Var1:
Dog
Cat
Bird

$Var2:
makes wau
makes miau
makes beep

How can I mix both of them like:

$Var3 Dog makes wau Cat makes miau Bird makes beep

$Var3 = $Var1 + $Var2 dosen't work

1 Answer 1

1

this is a rapid way (variables's lenght must be equal):

$i = 0 ; $var3 = $var1 | % { "$_ $($var2[$i])"; $i++ }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.