for(let i = 0; i < 1200; i++){
let button = new myButtons();
console.log(button);
}
for(let i = 0; i < 1200; i++){
let window['button' + i] = new myButtons(i);
console.log(window['button' + i]);
}
let buttons = new Array(1200);
for(let i = 0; i < buttons.length; i++){
buttons[i] = new myButtons();
}
let buttons = [];
for(let i = 0; i < 1200; i++){
buttons.push( new myButtons() );
}
let obj = {};
for (let i = 0; i < 1200; i++) {
obj[`button${_i}`] = new Button();
}
let foo = 'bar';
let obj = {
[foo]: 'bar'
}; // => { bar: 'bar' }