So I have:
// some function that returns two arrays ..
getArrays() {
return {
arr1: [...],
arr2: [...]
};
}
// and then ..
let arr1 = [];
let arr2 = [];
if (someCondition) {
{ arr1, arr2 } = getArrays();
}
// here we expect arrays, even if they are empty ..
Of course, this throws an error. Is this even possible?
PS: I can use default values and directly call the function, but still - I think it should be possible.