class Draw {
constructor(h, w, id) {
this.h = h;
this.w = w;
}
create() {
let createConvas = document.querySelector('div');
createConvas.innerHTML = `<convas width=${this.w} height=${this.h}></convas>`;
return createConvas;
}
}
let draw = new Drawd;
draw.create(2, 4);
document.body.append(draw)
class Draw {
constructor(h, w, id = '') {
this.h = h;
this.w = w;
}
create() {
let createConvas = document.querySelector('div');
createConvas.innerHTML = `<canvas width=${this.w} height=${this.h}></canvas>`;
return createConvas;
}
}
let draw = new Draw(2, 4);
draw.create();
document.body.append(draw);