function createGrid( section, dimensions ) {
var grid = new GridLayout({
dimensions: dimensions
});
var surfaces = [];
grid.sequenceFrom(surfaces);
for(var i = 0; i < dimensions[0] * dimensions[1]; i++) {
surfaces.push(new Surface({
content: section + ' ' + (i + 1),
size: [undefined, undefined],
properties: {
backgroundColor: "hsl(" + (i * 360 / 8) + ", 100%, 50%)",
color: "#404040",
textAlign: 'center'
}
}));
}
return grid;
}
как написать
for(var i = 0; i < dimensions[0] * dimensions[1]; i++)
в Coffee? Заранее Благодарен за вашу помощь!