Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
主要的 Javascript 解释器是否有任何内置优化?我正在考虑非常简单的案例,例如
while(i < array.length) { ... }
你的代码可以优化,如果这就是你的要求。
var ln = array.length; // save length into local variable to reduce scope while(ln--) { ... } // only one value is evaluated in while statement