ershpush
28 Jul 2012, 8:02 AM
How to avoid copying the code in the next example:
items: [
{
xtype: 'button',
height: 23,
width: 23,
text: ' 0'
},
{
xtype: 'button',
height: 23,
width: 23,
text: 1
},
{
xtype: 'button',
height: 23,
width: 23,
text: 2
},
{
xtype: 'button',
height: 23,
width: 23,
text: 3
}
]
How to apply loop for(i=0; i<4; i++) {...} ? ~o)
items: [
{
xtype: 'button',
height: 23,
width: 23,
text: ' 0'
},
{
xtype: 'button',
height: 23,
width: 23,
text: 1
},
{
xtype: 'button',
height: 23,
width: 23,
text: 2
},
{
xtype: 'button',
height: 23,
width: 23,
text: 3
}
]
How to apply loop for(i=0; i<4; i++) {...} ? ~o)