Minimum Javascript version in macros

Can’t say there is a GUI. A debugger is what I see.
.
When I look for your code & try to edit I receive the following message:
.


.
Don’t see in your file what is supposed to execute the code.
.
Again, probably beyond my knowledge in this area. I have a better chance with Python or even basic.

I was executing the code manually from Tools/Macros/Run. No idea why it’d complain about a reserved word on line 21. You saw the code listed in a previous file.

It is strange for you to use Tools>Macros>Run as these are functions requiring parameters and have return information. No where to input parameters and no place to put return data.
.
Interface seems incorrect here. Would think a function is called from a cell and data (or whatever) is returned there.
.
Edit:
Possibly a call from Basic as posted here > Solved: How to call JavaScript function from Basic

I abandoned that code entirely. The new solution uses C#. The role of Calc was replaced by JSON. I ended up not needing LibreOffice at all.