Ray's playground

 

2010年7月14日

Awful Parts(Appendix A. of JavaScript: The Good Parts)

摘要: 1. Global Variables  There are three ways to define global variables. The first is to place a var statement outside of any function:  The second is to add a property directly to the global object. The... 阅读全文

posted @ 2010-07-14 22:36 Ray Z 阅读(264) 评论(0) 推荐(0)

Style(Chapter 9 of JavaScript: The Good Parts)

摘要: I want to avoid idioms that look like mistakes.  I never allow switch cases to fall through to the next case. I once found a bug in my code caused by an unintended fall through immediately after havin... 阅读全文

posted @ 2010-07-14 12:51 Ray Z 阅读(227) 评论(0) 推荐(0)

导航