Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: