shader-program icon indicating copy to clipboard operation
shader-program copied to clipboard

Use Object Destructuring

Open AhiVT opened this issue 7 years ago • 0 comments

Function local variables can be assigned to by using Object Destructuring. You can find out more about Object Destructuring here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment

Example: Without Destructuring:

let a = this.a;
let b = this.b;
let c = this.c;

With Destructuring:

let { a, b, c } = this;

AhiVT avatar Jan 16 '19 18:01 AhiVT