$NaN value in pavlovia even if PsychoPy references source Excel correctly

I don’t know where exactly to put print(‘loss’,loss). I placed it right before the if structure and the browser stopped as if wanting to print on a printer.

Regardless, I think I found the source of the problem, but I still don’t know how to fix it.
I believe the problem comes from the fact that the online JS/Pavlovia code cannot read the variables from the Excel file - not all of them at least. The first iteration is always read. But after the first one, I always receive NaN.

For example, when I comment the line loss=Math.round(loss,0), I receive “undefined” for loss.
But that’s weird because loss is defined in the JS code using “var loss” and in the Excel file.

Looking into other questions on the forum, I saw that this may stem from the trialList component of the js code:

Here is the piece of my code:

How do I check that the Excel file is correctly loaded on the online platform?