Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
CoffeeScriptã®é¢æ°ã¯æç¤ºçã«returnããã¹ã | CreativeStyle æ¬å½ã«é ãã®ããããã確ããã¾ãããã é©å½ã«ã§ã£ã¡ãããã³ã¼ãã§ã f1 = -> for i in [1, 2, 3] for j in [4, 5, 6] i + j f2 = -> for i in [1, 2, 3] for j in [4, 5, 6] i + j return console.time "f1" for i in [1..100000] then f1() console.timeEnd "f1" console.time "f2" for i in [1..100000] then f2() console.timeEnd "f2" å®è¡ãã¦ã¿ã¾ã $ coffee hoge.coffee f1: 105ms f2: 4ms ç´26åéããã¨ãããã¨ããããã¾ãã
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule of CoffeeScript is: âItâs just JavaScript.â The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can u
ã©ã³ãã³ã°
ãç¥ãã
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}