Here is some topical coffee script code. Think of those poor horses.
class FrozenLasagne country: null horsePercentage: null constructor: (@country='UK') -> @horsePercentage = if @country is 'UK' 100 else 90 inspect: -> "I was sold in [email protected]} so I am probably [email protected]}% horse" console.log new FrozenLasagne console.log new FrozenLasagne 'FI'
This code will blow your mind (and perhaps put you off frozen lasagne) when you run it with coffee:
coffee horse.coffee I was sold in UK so I am probably 100% horse I was sold in FI so I am probably 90% horse
Wow, wasn't that illuminating?