摘要: Stock market volatility continues unabated. It may be too early to tell, but I’m marking the top of this current market correction at July 20, with th... 阅读全文
posted @ 2015-09-28 12:47 枪侠 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 在JavaScript中,可以通过两种方式创建数组,Array构造函数和 [] 便捷方式, 其中后者为首选方法。数组对象继承自Object.prototype,对数组执行typeof操作符返回‘object’而不是‘array’。然而执 行[] instanceof Array返回true。此外,还... 阅读全文
posted @ 2015-09-28 10:52 枪侠 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 我们一般用循环来遍历数组,而循环一直是 JavaScript 性能问题的常见来源,有时循环用得不好会严重降低代码的运行速度。例如,遍历数组时,我们会很自然地写出下面这种代码:// 未优化的代码1var array = [0,1,2,3,4,5,6,7,8,9];// for-in 循环for (va... 阅读全文
posted @ 2015-09-28 10:44 枪侠 阅读(690) 评论(0) 推荐(0) 编辑