Javascript – Is it possible to unpack/destructure class attributes into variables?
I'm using P5.js, but the question is applicable to Javascript in general In p5.js we have a class p5.Vector which is useful to manipulate vectors, since it already implements a variety of methods for vectors (addition, heading, magnitude, rotation...) Vector…