Created
July 25, 2018 15:42
-
-
Save schwartzmx/f2a9eadfb70be6507145cdf7de86e98a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1..100 | % { | |
switch ($_) { | |
{ $_ % 3 -eq 0 -and $_ % 5 -eq 0 } { "fizzbuzz" } | |
{ $_ % 3 -eq 0 } { "fizz" } | |
{ $_ % 5 -eq 0 } { "buzz" } | |
default { $_ } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment