Do the 开发者_如何转开发main Javascript interpreters have any built in optimisation at all? I'm thinking of very simple cases like
while(i < array.length) { ... }
your code can be optimize, if that's what you're asking.
var ln = array.length; // save length into local variable to reduce scope
while(ln--) { ... } // only one value is evaluated in while statement
精彩评论