On one line

And without spaces?

for(byte i=2;i<=10;i++)pinMode(i,OUTPUT);