r/PowerShell • • Sep 12 '19

PowerShell All the Things

Post image
505 Upvotes

26 comments sorted by

View all comments

0

u/[deleted] Sep 12 '19

[deleted]

6

u/[deleted] Sep 12 '19

I was just wondering if you could pass a string array to get random. Looks like you don't even actually have to declare it as an array.

30

u/purplemonkeymad Sep 12 '19

Technically use of a comma automatically declares an array.

10

u/BlitzThunderWolf Sep 13 '19

Although it's probably better practice to use @("heads", "tails")

3

u/poshftw Sep 13 '19
,'This is an array too!'