什么是CoffeeScript? [英] What is CoffeeScript?

查看:124
本文介绍了什么是CoffeeScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Coffeescript?如何使用?
它有用还是我们可以使用Javascript?
请提供一些小示例或链接,以了解有关此内容的信息.

What is Coffeescript and How can we use that?
Is it useful or we can go with Javascript?
Give small eg or link to learn about that.

推荐答案

CoffeeScript代码将一对一地编译为等效的JavaScript,并且在运行时没有任何解释.您可以从CoffeeScript无缝使用任何现有的JavaScript库(反之亦然).编译后的输出可读性强,打印精美,可通过JavaScript Lint传递而不会发出警告,可在每个JavaScript实现中使用,并且运行速度比等效的手写JavaScript快或快.

不错的基础教程可在 http://adamjspooner.github.com/coffeescript-meet-backbonejs/ [ ^ ]
CoffeeScript code compiles one-to-one into the equivalent JavaScript, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript implementation, and tends to run as fast or faster than the equivalent handwritten JavaScript.

Nice basic tutorial is available at http://adamjspooner.github.com/coffeescript-meet-backbonejs/[^]


请参阅:
http://en.wikipedia.org/wiki/CoffeeScript [ http://coffeescript.org/ [ ^ ].

有用"的问题根本没有意义.您首先需要了解您想做什么.

—SA
Please see:
http://en.wikipedia.org/wiki/CoffeeScript[^],
http://coffeescript.org/[^].

The question of "usefulness" makes no sense at all. You first need to understand what do you want to do.

—SA


这篇关于什么是CoffeeScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆