how to write setTimeout with params by Coffeescript

前端 未结 6 1098
轮回少年
轮回少年 2020-12-12 10:38

Please tell me how to write javascript below in coffeescript.

setTimeout(function(){
    something(param);
}, 1000);
6条回答
  •  无人及你
    2020-12-12 11:25

    setTimeout ( ->
      something param
    ), 1000
    

    The parentheses are optional, but starting the line with a comma seemed messy to me.

提交回复
热议问题