2012-02-04 47 views

回答

4

但是也有一些無法轉化爲CoffeeScript的表達了一些東西,如the documentation解釋說:

有無法進行有意義的轉換成表達式,即break在JavaScript語句了一把, continuereturn。如果您在一段代碼中使用它們,CoffeeScript將不會嘗試執行轉換。

一切是包裹在功能關閉和通過CoffeeScript的處理,這意味着你可以做很酷的東西一樣

alert(
    try 
    nonexistent/undefined 
    catch error 
    "And the error is ... #{error}" 
)