Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 490
Ulug'bek Avatar asked Feb 16 '26 00:02

Ulug'bek


1 Answers

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
like image 171
Esailija Avatar answered Feb 18 '26 12:02

Esailija



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!