相关疑难解决方法(0)

CoffeeScript,何时在箭头( - >)上使用胖箭头(=>),反之亦然

在CoffeeScript中构建类时,是否应使用=>("胖箭头")运算符定义所有实例方法,并使用->运算符定义所有静态方法?

coffeescript arrow-functions

131
推荐指数
4
解决办法
3万
查看次数

什么时候"胖箭头"(=>)绑定到"this"实例

胖箭头可以在不同的设置中使用,但它不会总是绑定到我想要的实例.

this coffeescript arrow-functions

10
推荐指数
1
解决办法
2202
查看次数

CoffeeScript,=>和 - >之间有什么区别

我是CoffeeScript的新手.我今天碰到了这个.

example -> 
 a ->
Run Code Online (Sandbox Code Playgroud)

example ->
 b =>
Run Code Online (Sandbox Code Playgroud)

瘦箭和胖箭的区别是什么?

有人可以解释这些差异以及何时应该使用它们.

javascript coffeescript

4
推荐指数
1
解决办法
4206
查看次数

标签 统计

coffeescript ×3

arrow-functions ×2

javascript ×1

this ×1