2017-05-27 44 views
0

我在TypeScript或CoffeScript上有一部分代碼,但我需要它在香草上,你能幫助我嗎?從Coffe(或Type)轉換爲vanilla js語言

da.getMatchHistory(options).then((result) => { 
    console.log(result); 
}, (errorResponseStatusText) => { 
    console.log(errorResponseStatusText); 
}); 

回答

1

我認爲這是帶有箭頭的JavaScript ...

da.getMatchHistory(options).then(function (result) { 
    console.log(result); 
}, function (errorResponseStatusText) { 
    console.log(errorResponseStatusText); 
}); 
+0

爲您輕鬆點,謝謝,它的工作原理! –