I'm trying to use destructuring assignment in Cloud Code on Parse.com, but when I run the code, the compiler gives me this error:
Result: ReferenceError: Invalid left-hand side in assignment
My code is this:
[a, b] = foo();
And for example foo is implemented as follows:
function foo()
{
return [2, 3];
}
In a lot of browsers this code works fine but... in Parse Cloud Code I still have this error.
How can I use destructuring assignment here? PS: I would prefer to use only an istruction to make this.