ES6 object destructing

25 Views Asked by At

In ES6, is ({width: this.width} = this.canvas); the same as this.width = this.canvas.width;?

If not, what will the correct code be?

0

There are 0 best solutions below