CoffeeScript JSON Array的寫法
来源:互联网 发布:java从精通到入门 编辑:程序博客网 时间:2024/05/03 13:33
在CoffeeScript中縮進和分隔符都很重要
比如
Code1
theArr=[ name:"name1" address:"Address1" , name:"name2" address:"Address2"]
(注意逗號的位置)
編譯成JS就是
// Generated by CoffeeScript 1.4.0(function() { var theArr; theArr = [ { name: "name1", address: "Address1" }, { name: "name2", address: "Address2" } ];}).call(this);
而如果CoffeeScript中
Code2
theArr=[ name:"name1" address:"Address1" , name:"name2" address:"Address2"]
(逗號往後面移動了一個空格)
就編譯成
// Generated by CoffeeScript 1.4.0(function() { var theArr; theArr = [ { name: "name1", address: "Address1", name: "name2", address: "Address2" } ];}).call(this);
- CoffeeScript JSON Array的寫法
- coffeescript遍历json对象
- coffeescript 的环境搭建
- 搭建CoffeeScript的編輯環境
- CoffeeScript里的or
- coffeescript的上下文
- CoffeeScript的缩进
- CoffeeScript
- CoffeeScript
- coffeescript(javascript) this 的理解
- coffeescript的N个tip
- coffeescript使用的方式汇总
- windows下CoffeeScript 的实现
- [CoffeeScript]图解C++、CoffeeScript 和 Ruby 的复杂度
- JavaScript的json和Array及Array数组的使用方法
- Play Framework 2 with Scala, Anorm, JSON, CoffeeScript, jQuery & Heroku
- json&Array&for..in&for的介绍
- List 与JSON array 之间的转换
- #define
- 65个面试技巧性回答『值得珍藏』!!!
- UVA 11806 Cheerleaders
- 严重: Servlet.service() for servlet ManagerServlet threw exception javax.el.PropertyNotFoundException:
- 为什么会浮躁
- CoffeeScript JSON Array的寫法
- linux 下解压命令大全
- USACO:Mixing Milk
- Silverlight 动画效果1 -- 旋转
- 3G上网本搭建无线路由供iPad上网
- maven安装自己下载的jar包到本地仓库
- VIM快捷键大全
- Oracle EBS R12 - 解决在Oracle Linux 5.8 64上装完后http服务不能启动的问题
- _T宏