I am trying to return multiple values from backend function and getting error.
Following code is in TVerify1 page.
import {Testverify} from ‘backend/Test’;
$w.onReady( function () {
console.log(“TVerify page started”)
let [T1, T2, T3] = Testverify();
console.log(T1, T2, T3)
});
Following code is in backend/Test file. Test file is a jsw file.
export function Testverify () {
let t1, t2, t3; /
let T1;
console.log(“Test Verify function called”)
t1 = “White”;
t2 = “Blue”;
t3 = “Green”;
T1 = “Yellow”;
console.log(t1, t2, T1)
return [t1, t2, t3];
}
Here I am just trying to pass values White, Blue and Green to the TVerify1 page.
I am getting following error. Please help to get this fixed.
TypeError: Invalid attempt to destructure non-iterable instance
Thanks.