Yes, arrays are objects. And JavaScript always returns this type for them. If you see list in the AppleScript dictionary, it’s an array in JavaScript. And records are objects proper. That is they do not provide the array methods.
The issue was indeed simply rebooting the computer.
Perhaps related - my system was so frozen on Apple News that it took a hard reset (powering down) to reboot the computer. Perhaps that is why the Javascript timed at in some trials. Not sure why Applescript worked when Javascript did not.
But in any event the JXA scripting is fully functional now - should be very interesting to try out some ideas for presenting data using Javascript.
Firstly, selectedRecords does not have to be enumerated to get to the individual properties, one can get the list of properties directly.
Secondly, for n in a; a[n]… is kind of „von hinten durch die Brust ins Auge“ (hopefully DeepL knows this one). Use forEach to iterate over an array if you do not need the indices. And even if you do need them, forEach is nicer because it gives you the array element and the index directly. No need for a[n].