Skip to content

Instantly share code, notes, and snippets.

View mikefowler's full-sized avatar

Mike Fowler mikefowler

View GitHub Profile
getRandomColor: ->
number = Math.floor(Math.random() * (3 - 1 + 1)) + 1
switch number
when 1 then "#983a30"
when 2 then "#187598"
# why not
getRandomColor: -> ["#983a30", "#187598"][Math.ceil(Math.random() * 3)]