7 ms·
The dirty solution I wrote in Powershell does something similar: 1..100 | % {"$_ $(('fizz','')[$_%3])$(('buzz','')[$_%5])"} I am not sure that using [$_%3] to
by hug 10mo ago
The dirty solution I wrote in Powershell does something similar:
1..100 | % {"$_ $(('fizz','')[$_%3])$(('buzz','')[$_%5])"}
I am not sure that using [$_%3] to index into a two-value array doesn't count as a "disguised boolean" thought.