标签:javascript
使用字面量语法创建对象
//good var itemA = {}; //bad var itemB = new Object();
//good var studentA = {defaults:{name:'Jay'},sexual:male}; //bad var studentB = {default:{name:'Lucy'},sexual:female};
//good var studentA = {classNo:'1'}; //bad var studentB = {klass:'2'}; //bad var studentC = {class:'3'};
标签:javascript
原文地址:http://blog.csdn.net/princeterence/article/details/45692119