I recently started poking around at Go again.
I like to prove I can write FizzBuzz in a new language (without looking up any language-specific syntax).
This is pretty straightforward - sometimes people go with a case statement, but I wasn't sure what kinds of comparisons were allowed in a Go switch. It might be fun to see if I can perform an evaluation (i%5 ==0), or am limited to specific values (1,'a', false).
No comments:
Post a Comment