3
我正在看Jeremy on CoffeeScript上的this great video。他解釋說,CoffeeScript的理想之一就是「一切都是一種表達」。CoffeeScript中的非表達式是什麼?
CoffeeScript有多接近這種理想?什麼是CoffeeScript非表達式?
我正在看Jeremy on CoffeeScript上的this great video。他解釋說,CoffeeScript的理想之一就是「一切都是一種表達」。CoffeeScript中的非表達式是什麼?
CoffeeScript有多接近這種理想?什麼是CoffeeScript非表達式?
但是也有一些無法轉化爲CoffeeScript的表達了一些東西,如the documentation解釋說:
有無法進行有意義的轉換成表達式,即
break
在JavaScript語句了一把,continue
和return
。如果您在一段代碼中使用它們,CoffeeScript將不會嘗試執行轉換。
一切是包裹在功能關閉和通過CoffeeScript的處理,這意味着你可以做很酷的東西一樣
alert(
try
nonexistent/undefined
catch error
"And the error is ... #{error}"
)