If you have a JavaScript function that returns two values, is it possible to assign those values to two variables in a single statement?
For example, in Python it might look like:
(var1, var2) = function()
I have tried a few things my tres look like this:
this.(var1, var2) = function();
I also tried something along the lines of:
this.var1, this.var2 = function();
and
this.var1 = this.var2 = function();
I also attempted using a single array instead of multiple variables, but it would complicate what I'm trying to accomplish later on because the two variables are used to story x and y coordinates.