small medium large xlarge

Back to: All Forums  CoffeeScript
Mark1_pragsmall
10 Aug 2011, 23:24
R. Mark Volkmann (13 posts)

Why does this work range = [3..5] but this doesn’t? low = 3; high = 5; range = [low..high]

Interestingly you can do this if low and high are properties of an object. obj = {} obj.low = 3 obj.high = 5 obj.getRange = -> [@low..@high] range = obj.getRange()

Trevor_burnham__goofy_headshot__pragsmall
13 Aug 2011, 17:45
Trevor Burnham (54 posts)

You’ve just found a bug! The good news is, the bug only affects the REPL, and it’s been fixed in the latest CoffeeScript release (1.1.2).

You must be logged in to comment