This program in development tools directly the console. The log shows calls, traverse the works, in the end with real machine debugging error, length undefine,
OnLoad: function () {
Var that=this;
Const eventChannel=this. GetOpenerEventChannel ()
EventChannel. On (' acceptDataFromOpenerPage ', function (data) {
That the setData ({
Result: the data [0],
UserAnswer: data [1],
})
})
Var userAnswer=this. Data. UserAnswer;
Var result=this. Data. The result;
Var maxCount=0;
Var unitCount=[];
The console. The log (result)
for (let i=0; i Var letnum=result [I] num
Var yourCount=0
for (let i=0; i YourCount=yourCount + parseInt (userAnswer [letnum [I]]).
}
UnitCount=unitCount. Concat (yourCount)
}