Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Official FROZEN VOID fan thread

Name: Anonymous 2009-01-05 22:33

In Javascript 1.7 another feature was introduced into the language,by far the most useful yet. Its Destructuring assignment- a mix of array swap and initialization. [1]

KING OF TROLLS


[1] http://frozenvoid.blogspot.com/2008/12/destructuring-assignment.html

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 7:52

>>10
 for(var i = 0; i < divs.length; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }

can be faster with

var divl=divs.length
 for(var i = 0; i < divl; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }
Because you call divs.length on every iteration.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List