This question already has answers here:
Closed 6 years ago.
When I try to convert the following snippet of code ...
result.pause = function() {
cachedValue = this();
isPaused(true);
}.bind(result);
using http://js2coffee.org/ it returns
result.pause = ->
cachedValue = this()
isPaused true
.bind(result)
However that code is incorrect when you try to compile it you get back Error Unexpected '.'
What would the correct way to use the .bind function in this situation using CoffeeScript be?