Ulug'bek
Ulug'bek

Reputation: 2832

Coffeescript - Use 'this' together function params

I'm beginner web programing, and I'm learning CoffeeScript from documentaion , but I didn't understand fully. Now I have a question: if I have a javascript like this

bindCallback.apply(this, arguments);

how can I rewrite with Coffeescript

Upvotes: 3

Views: 48

Answers (1)

Esailija
Esailija

Reputation: 140230

You can just remove the semicolon:

bindCallback.apply(this, arguments)

The parentheses can also be removed:

bindCallback.apply this, arguments

this is aliased to @ as well:

bindCallback.apply @, arguments

Upvotes: 2

Related Questions